def process_task(self, body, message): fun = body["fun"] args = body["args"] kwargs = body["kwargs"] print ("Got task: %s on %s" % (reprcall(fun.__name__, args, kwargs), message.delivery_info)) try: fun(*args, **kwdict(kwargs)) except Exception, exc: print ("task raised exception: %r" % exc)
def process_task(self, body, message): func = body["func"] args = body["args"] kwargs = body["kwargs"] self.info("Got task: %s", reprcall(func.__name__, args, kwargs)) try: func(*args, **kwdict(kwargs)) except Exception, exc: self.error("task raised exception: %r", exc)
def process_task(self, body, message): fun = body['fun'] args = body['args'] kwargs = body['kwargs'] logger.info('Got task: %s', reprcall(fun.__name__, args, kwargs)) try: fun(*args, **kwdict(kwargs)) except Exception, exc: logger.error('task raised exception: %r', exc)
def _rcb(obj): if obj is None: return '<missing>' if isinstance(obj, str): return obj if isinstance(obj, tuple): cb, args = obj return reprcall(cb.__name__, args=args) return obj.__name__
def process_task(self, body, message): fun = body["fun"] args = body["args"] kwargs = body["kwargs"] logger.info("Got task: %s", reprcall(fun.__name__, args, kwargs)) try: fun(*args, **kwdict(kwargs)) except Exception as exc: logger.error("task raised exception: %r", exc) message.ack()
def process_task(self, body, message): fun = body['fun'] args = body['args'] kwargs = body['kwargs'] print('Got task: %s on %s' % (reprcall(fun.__name__, args, kwargs), message.delivery_info)) try: fun(*args, **kwdict(kwargs)) except Exception, exc: print('task raised exception: %r' % exc)
def process_task(body, message): fun = body['fun'] args = body['args'] kwargs = body['kwargs'] #logger.info('Got task: %s', reprcall(fun.__name__, args, kwargs)) logit("Got task : %s" % reprcall(fun.__name__, args, kwargs)) try: fun(*args, **kwdict(kwargs)) except Exception as exc: #logger.error('task raised exception: %r', exc) logit("task raised exception: %r" % exc) message.ack()
def process_task(self, body, mesage): fun = body['fun'] args = body['args'] kwargs = body['kwargs'] logger.info(str.format( '[~] Got task: {}', reprcall(fun.__name__, args, kwargs) )) try: fun(*args, **kwdict(kwargs)) except Exception as e: logger.error(str.format( '[#] Task raised exception: {}', e )) mesage.ack()
def test_reprcall(self): self.assertTrue(utils.reprcall("add", (2, 2), {"copy": True}))
def __repr__(self): return '<{name}: {0.name} {call} {0.schedule}'.format( self, call=reprcall(self.task, self.args or (), self.kwargs or {}), name=type(self).__name__, )
def __repr__(self): return '<%s %s: %s>' % (type(self).__name__, self.id, reprcall(self.name, self.args, self.kwargs))
def _reprcall(self, method, args): return '%s.%s' % (self.name, reprcall(method, (), args))
def __repr__(self): return ("<Entry: %s %s {%s}" % (self.name, reprcall(self.task, self.args or (), self.kwargs or {}), self.schedule))
def __repr__(self): return "<Entry: %s %s {%s}" % ( self.name, reprcall(self.task, self.args or (), self.kwargs or {}), self.schedule, )
def _inner(self, *args, **kwargs): print("CALL: %r" % reprcall(self.name, args, kwargs)) return fun(*args, **kwargs)
def __repr__(self): return '<Entry: {0.name} {call} {0.schedule}'.format( self, call=reprcall(self.task, self.args or (), self.kwargs or {}), )
def __repr__(self): return reprcall(self["task"], self["args"], self["kwargs"])
def __repr__(self): return '<{0} {1}: {2}>'.format( type(self).__name__, self.id, reprcall(self.name, self.args, self.kwargs))
def __repr__(self): return reprcall('ffwd', (), self._fields(weeks=self.weeks, weekday=self.weekday))
def test_reprcall(self): self.assertTrue(utils.reprcall('add', (2, 2), {'copy': True}), )
def reprcall(self, *args, **kwargs): args, kwargs, _ = self._merge(args, kwargs, {}) return reprcall(self['task'], args, kwargs)
def test_reprcall(self): self.assertTrue( utils.reprcall('add', (2, 2), {'copy': True}), )
def __repr__(self): return ("<Entry: %s %s {%s}" % (self.name, reprcall(self.task, self.args, self.kwargs), self.schedule))