
Django & Celery
Celery setup, tasks, periodic tasks, task routing, retry strategies, monitoring, beat scheduler
1What is the main role of Celery in a Django application?
What is the main role of Celery in a Django application?
คำตอบ
Celery is a distributed asynchronous task queue that allows executing long-running or resource-intensive operations in the background, without blocking HTTP requests. This improves user experience by making the application more responsive, particularly for sending emails, image processing, or intensive computations.
2Which Celery component is responsible for storing pending task messages?
Which Celery component is responsible for storing pending task messages?
คำตอบ
The message broker (like Redis or RabbitMQ) is the central component that stores task messages pending execution. It acts as an intermediary between the task producer (Django) and the Celery workers that consume and execute these tasks.
3How to define a basic Celery task in a Django application?
How to define a basic Celery task in a Django application?
คำตอบ
A Celery task is defined by using the @shared_task or @app.task decorator on a Python function. The @shared_task decorator is preferred as it allows reusing the task across different applications without depending on a specific Celery instance.
What is the difference between task.delay() and task.apply_async()?
Which file is typically created at the root of the Django project to configure Celery?
+19 คำถามสัมภาษณ์
หัวข้อสัมภาษณ์ Django อื่นๆ
Python Basics
Python OOP
Django Fundamentals
Django Models - Basics
Django Views
Django Templates
Django Forms
Advanced QuerySets
Django Authentication
Django Middleware
Django Admin
Django REST Framework
Django Signals
File Upload
Django Caching
Django Sessions
Django Email
Django Testing
Django Security
Django Deployment
Advanced Django ORM
Django Performance
Django Channels
Django & GraphQL
Django & Docker
Django in Microservices Ecosystem
Custom Django Commands
Django Internationalization
Django Design Patterns
Django Async & ASGI
Settings & Production Configuration
Observability & Monitoring
เชี่ยวชาญ Django สำหรับการสัมภาษณ์ครั้งถัดไป
เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์
เริ่มใช้ฟรี