コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4241 ビュー

 in create method i call function . if in case job is failed then how to resend it.

def create(self, cr, uid, ids, context=None):

      res = super(project, self).create(cr, uid, ids, context=context)

      time_now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")

       nextcall = parser.parse(time_now) + timedelta(seconds=10)

       self.pool.get('ir.cron').create(cr, uid, {

       'name': 'This is Cron job',

      'user_id': uid,

      'model': 'project.project',

       'function': '_compute_project',

      'nextcall': nextcall,

      'args': repr([res])

})

return res

アバター
破棄
関連投稿 返信 ビュー 活動
2
4月 23
2958
0
3月 15
5681
1
3月 15
5979
8
5月 23
24685
0
5月 21
3745