Exemple #1
0
 def new(cls, data, status='pending', **options):
     options.setdefault('path', getattr(g, 'path', None))
     state = TaskState.make(dict(
         type=cls.name,
         status=status,
         options=options,
         data=data))
     state.m.insert()
     return cls(state)
Exemple #2
0
 def new(cls, data, status='pending', **options):
     state = TaskState.make(
         dict(type=cls.name, status=status, options=options, data=data))
     state.m.insert()
     return cls(state)
Exemple #3
0
 def new(cls, data, status='pending', **options):
     options.setdefault('path', getattr(g, 'path', None))
     state = TaskState.make(
         dict(type=cls.name, status=status, options=options, data=data))
     state.m.insert()
     return cls(state)
Exemple #4
0
 def new(cls, data, status="pending", **options):
     state = TaskState.make(dict(type=cls.name, status=status, options=options, data=data))
     state.m.insert()
     return cls(state)