本文整理匯總了Python中gc3libs.workflow.RetryableTask.retry方法的典型用法代碼示例。如果您正苦於以下問題:Python RetryableTask.retry方法的具體用法?Python RetryableTask.retry怎麽用?Python RetryableTask.retry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gc3libs.workflow.RetryableTask
的用法示例。
在下文中一共展示了RetryableTask.retry方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: retry
# 需要導入模塊: from gc3libs.workflow import RetryableTask [as 別名]
# 或者: from gc3libs.workflow.RetryableTask import retry [as 別名]
def retry(self):
# return True or False depending whether the application
# should be re-submitted or not.
# The actual CodemlApplication is available as `self.task`,
# so for instance `self.task.valid[0]` is `True` iff the
# H0.mlc file is present and processed correctly.
# gc3libs.log.debug("CodemlRetryPolicy called!")
# for now, do the default (see: gc3libs/__init__.py)
to_retry = RetryableTask.retry(self)
gc3libs.log.debug("CodemlRetryPolicy called with retry [%s]" % str(to_retry))
return to_retry
示例2: retry
# 需要導入模塊: from gc3libs.workflow import RetryableTask [as 別名]
# 或者: from gc3libs.workflow.RetryableTask import retry [as 別名]
def retry(self):
"""
Task will be retried iif the application crashed
due to an error within the exeuction environment
(e.g. VM crash or LRMS kill)
"""
# XXX: check whether it is possible to distingish
# between the error conditions and set meaningfull exitcode
to_retry = RetryableTask.retry(self)
gc3libs.log.debug("GWeightTask called with retry [%s]" % str(to_retry))
return to_retry