MCPcopy
hub / github.com/celery/celery / close

Method close

celery/app/base.py:462–474  ·  view source on GitHub ↗

Clean up after the application. Only necessary for dynamically created apps, and you should probably use the :keyword:`with` statement instead. Example: >>> with Celery(set_as_current=False) as app: ... with app.connection_for_write() as conn:

(self)

Source from the content-addressed store, hash-verified

460 register_after_fork(self, _after_fork_cleanup_app)
461
462 def close(self):
463 """Clean up after the application.
464
465 Only necessary for dynamically created apps, and you should
466 probably use the :keyword:`with` statement instead.
467
468 Example:
469 >>> with Celery(set_as_current=False) as app:
470 ... with app.connection_for_write() as conn:
471 ... pass
472 """
473 self._pool = None
474 _deregister_app(self)
475
476 def start(self, argv=None):
477 """Run :program:`celery` using `argv`.

Callers 10

test_get_active_appsMethod · 0.95
__exit__Method · 0.95
_reconnectMethod · 0.45
stopMethod · 0.45
on_after_forkMethod · 0.45
stopMethod · 0.45
session_cleanupFunction · 0.45
_maybe_close_fdFunction · 0.45
_close_databaseMethod · 0.45
reconnectMethod · 0.45

Calls 1

_deregister_appFunction · 0.90

Tested by 1

test_get_active_appsMethod · 0.76