Permalink
Browse files

Cosmetics

  • Loading branch information...
ask committed Sep 25, 2012
1 parent 9ba81c4 commit f58ef59961ba76a19729ea925bc3a2229965f102
Showing with 7 additions and 5 deletions.
  1. +7 −5 celery/apps/worker.py
View
@@ -91,8 +91,9 @@ def on_before_init(self, purge=False, no_color=None, **kwargs):
# this signal can be used to set up configuration for
# workers by name.
conf = self.app.conf
- signals.celeryd_init.send(sender=self.hostname, instance=self,
- conf=conf)
+ signals.celeryd_init.send(
+ sender=self.hostname, instance=self, conf=conf,
+ )
self.purge = purge
self.no_color = no_color
self._isatty = isatty(sys.stdout)
@@ -108,8 +109,9 @@ def on_start(self):
# this signal can be used to e.g. change queues after
# the -Q option has been applied.
- signals.celeryd_after_setup.send(sender=self.hostname, instance=self,
- conf=self.app.conf)
+ signals.celeryd_after_setup.send(
+ sender=self.hostname, instance=self, conf=self.app.conf,
+ )
if getattr(os, 'getuid', None) and os.getuid() == 0:
warnings.warn(RuntimeWarning(
@@ -145,7 +147,7 @@ def purge_messages(self):
def tasklist(self, include_builtins=True):
tasks = self.app.tasks
if not include_builtins:
- tasks = [t for t in tasks if not t.startswith('celery.')]
+ tasks = (t for t in tasks if not t.startswith('celery.'))
return '\n'.join(' . {0}'.format(task) for task in sorted(tasks))
def extra_info(self):

0 comments on commit f58ef59

Please sign in to comment.