Celery 1.0 Documentationapplication. blog/models.py The comment model looks like this: from django.db import models from django.utils.translation import ugettext_lazy as _ class Comment(models.Model): name = models.CharField(_("name") tasks from blog.models import Comment class CommentForm(forms.ModelForm): class Meta: model = Comment def add_comment(request, slug, template_name="comments/create.html"): post = get_object_or_404(Entry reconsider your strategy. There is no universal answer here. Data locality The worker processing the task should be as close to the data as possible. The best would be to have a copy in memory, the worst0 码力 | 221 页 | 283.64 KB | 1 年前3
Celery 1.0 Documentation(stable) blog/models.py The comment model looks like this: from django.db import models from django.utils.translation import ugettext_lazy as _ class Comment(models.Model): name = models.CharField(_("name") blog import tasks from blog.models import Comment class CommentForm(forms.ModelForm): class Meta: model = Comment def add_comment(request, slug, template_name="comments/create.html"): post = get_object_or_404(Entry Documentation, Release 1.0.6 (stable) is no universal answer here. Data locality The worker processing the task should be as close to the data as possible. The best would be to have a copy in memory, the worst0 码力 | 123 页 | 400.69 KB | 1 年前3
Celery 2.0 Documentationthey’re not used – Avoid launching synchronous subtasks • Performance and Strategies – Granularity – Data locality – State – Database transactions 2.1.1 Basics A task is a class that encapsulates a function application. blog/models.py The comment model looks like this: from django.db import models from django.utils.translation import ugettext_lazy as _ class Comment(models.Model): name = models.CharField(_("name") blog import tasks from blog.models import Comment class CommentForm(forms.ModelForm): class Meta: model = Comment def add_comment(request, slug, template_name="comments/create.html"): post = get_object_or_404(Entry0 码力 | 165 页 | 492.43 KB | 1 年前3
Celery 2.0 Documentationif they’re not used Avoid launching synchronous subtasks Performance and Strategies Granularity Data locality State Database transactions Basics A task is a class that encapsulates a function and its application. blog/models.py The comment model looks like this: from django.db import models from django.utils.translation import ugettext_lazy as _ class Comment(models.Model): name = models.CharField(_("name") tasks from blog.models import Comment class CommentForm(forms.ModelForm): class Meta: model = Comment def add_comment(request, slug, template_name="comments/create.html"): post = get_object_or_404(Entry0 码力 | 284 页 | 332.71 KB | 1 年前3
Celery 2.1 DocumentationFigure 2: Worker bindings. Go to Routing Tasks. Celery takes advantage of AMQPs flexible routing model. Tasks can be routed to specific servers, or a cluster of servers by binding workers to different if they’re not used Avoid launching synchronous subtasks Performance and Strategies Granularity Data locality State Database transactions Example blog/models.py blog/views.py blog/tasks.py This guide processing other waiting tasks. However, executing a task does have overhead. A message needs to be sent, data may not be local, etc. So if the tasks are too fine-grained the additional overhead may not be worth0 码力 | 463 页 | 861.69 KB | 1 年前3
Celery 2.1 DocumentationFigure 2: Worker bindings. Go to Routing Tasks. Celery takes advantage of AMQPs flexible routing model. Tasks can be routed to specific servers, or a cluster of servers by binding workers to different they’re not used – Avoid launching synchronous subtasks • Performance and Strategies – Granularity – Data locality – State – Database transactions • Example – blog/models.py – blog/views.py – blog/tasks processing other waiting tasks. However, executing a task does have overhead. A message needs to be sent, data may not be local, etc. So if the tasks are too fine-grained the additional overhead may not be worth0 码力 | 285 页 | 1.19 MB | 1 年前3
Celery 2.2 Documentationlimits can be set for each task type, or globally for all. Routing Using AMQP’s flexible routing model you can route tasks to different workers, or select different message topologies, by configuration Figure 2: Worker bindings. Go to Routing Tasks. Celery takes advantage of AMQPs flexible routing model. Tasks can be routed to specific servers, or a cluster of servers by binding workers to different if they’re not used Avoid launching synchronous subtasks Performance and Strategies Granularity Data locality State Database transactions Example blog/models.py blog/views.py blog/tasks.py This guide0 码力 | 505 页 | 878.66 KB | 1 年前3
Celery 2.3 Documentationlimits can be set for each task type, or globally for all. Routing Using AMQP’s flexible routing model you can route tasks to different workers, or select different message topologies, by configuration Figure 2: Worker bindings. Go to Routing Tasks. Celery takes advantage of AMQPs flexible routing model. Tasks can be routed to specific servers, or a cluster of servers by binding workers to different they’re not used – Avoid launching synchronous subtasks • Performance and Strategies – Granularity – Data locality – State – Database transactions • Example – blog/models.py – blog/views.py – blog/tasks0 码力 | 334 页 | 1.25 MB | 1 年前3
Celery 2.2 Documentationlimits can be set for each task type, or globally for all. Routing Using AMQP’s flexible routing model you can route tasks to different workers, or select different message topologies, by configuration Figure 2: Worker bindings. Go to Routing Tasks. Celery takes advantage of AMQPs flexible routing model. Tasks can be routed to specific servers, or a cluster of servers by binding workers to different they’re not used – Avoid launching synchronous subtasks • Performance and Strategies – Granularity – Data locality – State – Database transactions • Example – blog/models.py – blog/views.py – blog/tasks0 码力 | 314 页 | 1.26 MB | 1 年前3
Celery 2.3 Documentationlimits can be set for each task type, or globally for all. Routing Using AMQP’s flexible routing model you can route tasks to different workers, or select different message topologies, by configuration Figure 2: Worker bindings. Go to Routing Tasks. Celery takes advantage of AMQPs flexible routing model. Tasks can be routed to specific servers, or a cluster of servers by binding workers to different if they’re not used Avoid launching synchronous subtasks Performance and Strategies Granularity Data locality State Database transactions Example blog/models.py blog/views.py blog/tasks.py This guide0 码力 | 530 页 | 900.64 KB | 1 年前3
共 51 条
- 1
- 2
- 3
- 4
- 5
- 6













