def handle(self, *commands, **options): verbosity = options.get('verbosity', 1) server = options.get('server', False) if not settings.GEARMAN_SERVERS: logging.error("No gearman servers configured") return if server: Server(verbosity).start() worker = create_worker() if verbosity > 0: logging.info("Starting workers: " + ', '.join(worker.abilities.keys())) worker.work()
def handle(self, *commands, **options): verbosity = options.get('verbosity', 1) server = options.get('server', False) if not settings.GEARMAN_SERVERS: logging.error("No gearman servers configured") return if server: Server(verbosity).start() # Restart incomplete jobs for job in JobInfo.objects.filter(completed=False): job.run() worker = create_worker() logging.debug("Starting workers: " + ', '.join(worker.abilities.keys())) worker.work() logging.debug("Workers finished, exiting")
def handle(self, *commands, **options): verbosity = options.get('verbosity', 1) server = options.get('server', False) if not settings.GEARMAN_SERVERS: logging.error("No gearman servers configured") return if server: Server(verbosity).start() # Restart incomplete jobs for job in JobInfo.objects.filter(completed=False): job.run() worker = create_worker() if verbosity > 0: logging.info("Starting workers: " + ', '.join(worker.abilities.keys())) worker.work()