You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internals/reference/celery.backends.database.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ <h3>This Page</h3>
96
96
<spanid="backend-sqlalchemy-database-celery-backends-database"></span><h1>Backend: SQLAlchemy Database - celery.backends.database<aclass="headerlink" href="#module-celery.backends.database" title="Permalink to this headline">¶</a></h1>
97
97
<dlclass="class">
98
98
<dtid="celery.backends.database.DatabaseBackend">
99
-
<emclass="property">class </em><ttclass="descclassname">celery.backends.database.</tt><ttclass="descname">DatabaseBackend</tt><big>(</big><em>dburi='sqlite:///test.db'</em>, <em>engine_options=None</em>, <em>**kwargs</em><big>)</big><aclass="headerlink" href="#celery.backends.database.DatabaseBackend" title="Permalink to this definition">¶</a></dt>
99
+
<emclass="property">class </em><ttclass="descclassname">celery.backends.database.</tt><ttclass="descname">DatabaseBackend</tt><big>(</big><em>dburi=None</em>, <em>engine_options=None</em>, <em>**kwargs</em><big>)</big><aclass="headerlink" href="#celery.backends.database.DatabaseBackend" title="Permalink to this definition">¶</a></dt>
Copy file name to clipboardExpand all lines: internals/reference/celery.db.session.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ <h3>This Page</h3>
96
96
<spanid="sqlalchemy-session-celery-db-session"></span><h1>SQLAlchemy Session - celery.db.session<aclass="headerlink" href="#module-celery.db.session" title="Permalink to this headline">¶</a></h1>
97
97
<dlclass="function">
98
98
<dtid="celery.db.session.ResultSession">
99
-
<ttclass="descclassname">celery.db.session.</tt><ttclass="descname">ResultSession</tt><big>(</big><em>dburi='sqlite:///test.db'</em>, <em>**kwargs</em><big>)</big><aclass="headerlink" href="#celery.db.session.ResultSession" title="Permalink to this definition">¶</a></dt>
99
+
<ttclass="descclassname">celery.db.session.</tt><ttclass="descname">ResultSession</tt><big>(</big><em>dburi=None</em>, <em>**kwargs</em><big>)</big><aclass="headerlink" href="#celery.db.session.ResultSession" title="Permalink to this definition">¶</a></dt>
Copy file name to clipboardExpand all lines: internals/reference/celery.utils.compat.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -144,7 +144,7 @@ <h3>This Page</h3>
144
144
145
145
<dlclass="method">
146
146
<dtid="celery.utils.compat.OrderedDict.pop">
147
-
<ttclass="descname">pop</tt><big>(</big><em>key</em>, <em>default=<object object at 0x103d38a10></em><big>)</big><aclass="headerlink" href="#celery.utils.compat.OrderedDict.pop" title="Permalink to this definition">¶</a></dt>
147
+
<ttclass="descname">pop</tt><big>(</big><em>key</em>, <em>default=<object object at 0x103bbf580></em><big>)</big><aclass="headerlink" href="#celery.utils.compat.OrderedDict.pop" title="Permalink to this definition">¶</a></dt>
Copy file name to clipboardExpand all lines: internals/reference/celery.worker.listener.html
+16-15Lines changed: 16 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -103,17 +103,18 @@ <h3>This Page</h3>
103
103
connection is lost) it calls <aclass="reference internal" href="#celery.worker.listener.CarrotListener.reset_connection" title="celery.worker.listener.CarrotListener.reset_connection"><ttclass="xref py py-meth docutils literal"><spanclass="pre">reset_connection()</span></tt></a>,
104
104
and starts the consumer by calling <aclass="reference internal" href="#celery.worker.listener.CarrotListener.consume_messages" title="celery.worker.listener.CarrotListener.consume_messages"><ttclass="xref py py-meth docutils literal"><spanclass="pre">consume_messages()</span></tt></a>.</p>
105
105
</li>
106
-
<li><pclass="first"><ttclass="xref py py-meth docutils literal"><spanclass="pre">reset_connection`()</span></tt>, clears the internal queues,
107
-
establishes a new connection to the broker, sets up the task queues (+ QoS),
108
-
the broadcast remote control command consumer, the event dispatcher and the
The reason for this is that not all carrot backends supports receiving
116
-
on different channels, so we use a little nasty trick
116
+
The reason is that some carrot backends doesn’t support consuming
117
+
from several channels simultaneously, so we use a little nasty trick
117
118
(<ttclass="xref py py-meth docutils literal"><spanclass="pre">_detect_wait_method()</span></tt>) to select the best
118
119
possible channel distribution depending on the functionality supported
119
120
by the carrot backend.</p>
@@ -126,20 +127,20 @@ <h3>This Page</h3>
126
127
it to <aclass="reference internal" href="#celery.worker.listener.CarrotListener.on_task" title="celery.worker.listener.CarrotListener.on_task"><ttclass="xref py py-meth docutils literal"><spanclass="pre">on_task()</span></tt></a>.</p>
127
128
<p>If the message is a control command the message is passed to
128
129
<aclass="reference internal" href="#celery.worker.listener.CarrotListener.on_control" title="celery.worker.listener.CarrotListener.on_control"><ttclass="xref py py-meth docutils literal"><spanclass="pre">on_control()</span></tt></a>, which in turn dispatches
129
-
the control command using the <ttclass="xref py py-attr docutils literal"><spanclass="pre">control_dispatcher</span></tt>.</p>
130
-
<p>It also tried to handle malformed or invalid messages properly,
130
+
the control command using the control dispatcher.</p>
131
+
<p>It also tries to handle malformed or invalid messages properly,
131
132
so the worker doesn’t choke on them and die. Any invalid messages
132
133
are acknowledged immediately and logged, so the message is not resent
133
-
again and again.</p>
134
+
again, and again.</p>
134
135
</li>
135
136
<li><pclass="first">If the task has an ETA/countdown, the task is moved to the <ttclass="docutils literal"><spanclass="pre">eta_schedule</span></tt>
136
-
so the <aclass="reference internal" href="celery.worker.scheduler.html#celery.worker.scheduler.Scheduler" title="celery.worker.scheduler.Scheduler"><ttclass="xref py py-class docutils literal"><spanclass="pre">celery.worker.scheduler.Scheduler</span></tt></a> can schedule it at its
137
-
deadline. Tasks without eta are moved immediately to the <ttclass="docutils literal"><spanclass="pre">ready_queue</span></tt>,
138
-
so it can be picked up by the <aclass="reference internal" href="celery.worker.controllers.html#celery.worker.controllers.Mediator" title="celery.worker.controllers.Mediator"><ttclass="xref py py-class docutils literal"><spanclass="pre">celery.worker.controllers.Mediator</span></tt></a>
139
-
and sent to the pool.</p>
137
+
so the <aclass="reference internal" href="celery.worker.scheduler.html#celery.worker.scheduler.Scheduler" title="celery.worker.scheduler.Scheduler"><ttclass="xref py py-class docutils literal"><spanclass="pre">Scheduler</span></tt></a> can schedule it at its
138
+
deadline. Tasks without an eta are moved immediately to the <ttclass="docutils literal"><spanclass="pre">ready_queue</span></tt>,
139
+
so they can be picked up by the <aclass="reference internal" href="celery.worker.controllers.html#celery.worker.controllers.Mediator" title="celery.worker.controllers.Mediator"><ttclass="xref py py-class docutils literal"><spanclass="pre">Mediator</span></tt></a>
140
+
to be sent to the pool.</p>
140
141
</li>
141
142
<li><pclass="first">When a task with an ETA is received the QoS prefetch count is also
142
-
incremented so we can reserve another message. When the ETA is met
143
+
incremented, so another message can be reserved. When the ETA is met
143
144
the prefetch count is decremented again, though this cannot happen
144
145
immediately because amqplib doesn’t support doing broker requests
145
146
across threads. Instead the current prefetch count is kept as a
@@ -161,7 +162,7 @@ <h3>This Page</h3>
161
162
</ul>
162
163
<dlclass="class">
163
164
<dtid="celery.worker.listener.CarrotListener">
164
-
<emclass="property">class </em><ttclass="descclassname">celery.worker.listener.</tt><ttclass="descname">CarrotListener</tt><big>(</big><em>ready_queue</em>, <em>eta_schedule</em>, <em>logger</em>, <em>init_callback=<function noop at 0x1034dd398></em>, <em>send_events=False</em>, <em>hostname=None</em>, <em>initial_prefetch_count=2</em><big>)</big><aclass="headerlink" href="#celery.worker.listener.CarrotListener" title="Permalink to this definition">¶</a></dt>
165
+
<emclass="property">class </em><ttclass="descclassname">celery.worker.listener.</tt><ttclass="descname">CarrotListener</tt><big>(</big><em>ready_queue</em>, <em>eta_schedule</em>, <em>logger</em>, <em>init_callback=<function noop at 0x1041672a8></em>, <em>send_events=False</em>, <em>hostname=None</em>, <em>initial_prefetch_count=2</em><big>)</big><aclass="headerlink" href="#celery.worker.listener.CarrotListener" title="Permalink to this definition">¶</a></dt>
165
166
<dd><p>Listen for messages received from the broker and
166
167
move them the the ready queue for task processing.</p>
0 commit comments