本文整理汇总了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