Permalink
Browse files

Additional options can be passed to submit_job task.

  • Loading branch information...
1 parent 360bfdc commit e805f8c9b95d9ec4dc2d236d92a11baccb0ff95b Vladimir Gorej committed Nov 16, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 django_gearman_commands/management/commands/gearman_submit_job.py
@@ -33,7 +33,8 @@ def handle(self, *args, **options):
self.stdout.write('Submitting job: {0:s}, job data: {1:s}.\n'.format(task_name, job_data if job_data else '(empty)'))
client = gearman.GearmanClient(django_gearman_commands.settings.GEARMAN_SERVERS)
- result = client.submit_job(task_name, job_data, wait_until_complete=False, background=True)
+ result = client.submit_job(task_name, job_data, wait_until_complete=options.get('wait_unit_complete', False),
+ background=options.get('background', True))
self.stdout.write('Job submission done, result: {0:s}.\n'.format(result))
except:

0 comments on commit e805f8c

Please sign in to comment.