示例#1
0
文件: tasks.py 项目: pmaccamp/shovel
 def __call__(self, *args, **kwargs):
     '''Invoke the task itself'''
     try:
         return self._obj(*args, **kwargs)
     except Exception as exc:
         logger.exception('Failed to run task %s' % self.name)
         raise(exc)
示例#2
0
文件: tasks.py 项目: Ju2ender/shovel
 def __call__(self, *args, **kwargs):
     '''Invoke the task itself'''
     try:
         return self._obj(*args, **kwargs)
     except Exception as exc:
         logger.exception('Failed to run task %s' % self.name)
         raise(exc)
示例#3
0
文件: tasks.py 项目: pmaccamp/shovel
 def make(cls, obj):
     '''Given a callable object, return a new callable object'''
     try:
         cls._cache.append(Task(obj))
     except Exception:
         logger.exception('Unable to make task for %s' % repr(obj))
示例#4
0
文件: tasks.py 项目: Ju2ender/shovel
 def make(cls, obj):
     '''Given a callable object, return a new callable object'''
     try:
         cls._cache.append(Task(obj))
     except Exception:
         logger.exception('Unable to make task for %s' % repr(obj))