Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Unified Diff: infra/bots/recipe_modules/run/api.py

Issue 2444883002: Add infra recipe module, use for updating Go DEPS (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/bots/recipe_modules/infra/api.py ('k') | infra/bots/recipes/swarm_RecreateSKPs.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/recipe_modules/run/api.py
diff --git a/infra/bots/recipe_modules/run/api.py b/infra/bots/recipe_modules/run/api.py
index ffcced19474b08b99f82b8ff4ea58f61e5cad35a..3ef69d806b3886e23a8c275f497c59a91ec07398 100644
--- a/infra/bots/recipe_modules/run/api.py
+++ b/infra/bots/recipe_modules/run/api.py
@@ -115,3 +115,15 @@ for pattern in build_products_whitelist:
''' % str(BUILD_PRODUCTS_ISOLATE_WHITELIST),
args=[src, dst],
infra_step=True)
+
+ def with_retry(self, steptype, name, attempts, *args, **kwargs):
+ for attempt in xrange(attempts):
+ step_name = name
+ if attempt > 0:
+ step_name += ' (attempt %d)' % (attempt + 1)
+ try:
+ steptype(step_name, *args, **kwargs)
+ return
+ except self.m.step.StepFailure:
+ if attempt == attempts - 1:
+ raise
« no previous file with comments | « infra/bots/recipe_modules/infra/api.py ('k') | infra/bots/recipes/swarm_RecreateSKPs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698