Skip to content

Instantly share code, notes, and snippets.

@ionelmc
Created May 9, 2013 15:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ionelmc/5548215 to your computer and use it in GitHub Desktop.
Save ionelmc/5548215 to your computer and use it in GitHub Desktop.
golden celery
# celery and it's dependencies
amqp==1.0.8
anyjson==0.3.3
kombu==2.5.6
python-dateutil==1.5
billiard==2.7.3.21
celery==3.0.15
# No connection pool to the broker (there's only 1 task per process anyway)
BROKER_POOL_LIMIT = None
CELERYD_MAX_TASKS_PER_CHILD = 1
from billiard.common import restart_state
def _run_silenced(self, func):
import logging
try:
return func(self)
except Exception:
logging.exception("Shit has hit the fan in %r", func)
restart_state.step = lambda self, func=restart_state.step: _run_silenced(self, func)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment