summaryrefslogtreecommitdiff
path: root/buildstream/context.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2017-07-27 10:20:53 +0100
committerJürg Billeter <j@bitron.ch>2017-07-27 11:58:44 +0100
commitbfd822b3232f69ed9df48a20fedf31be7e0986f1 (patch)
tree4f5859ebecbb3e89d7c6281184ac5a7ec62c3dfb /buildstream/context.py
parent855b63003ee15eb8cdd42f174a9193ee7b942ef5 (diff)
downloadbuildstream-bfd822b3232f69ed9df48a20fedf31be7e0986f1.tar.gz
Add network-retries option
Retry network tasks up to two times by default. Fixes #30
Diffstat (limited to 'buildstream/context.py')
-rw-r--r--buildstream/context.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/buildstream/context.py b/buildstream/context.py
index 97dfe86cd..64acd4fc4 100644
--- a/buildstream/context.py
+++ b/buildstream/context.py
@@ -110,6 +110,9 @@ class Context():
self.sched_pushers = 4
"""Maximum number of push tasks"""
+ self.sched_network_retries = 2
+ """Maximum number of retries for network tasks"""
+
self.sched_error_action = 'continue'
"""What to do when a build fails in non interactive mode"""
@@ -185,6 +188,7 @@ class Context():
self.sched_fetchers = _yaml.node_get(scheduler, int, 'fetchers')
self.sched_builders = _yaml.node_get(scheduler, int, 'builders')
self.sched_pushers = _yaml.node_get(scheduler, int, 'pushers')
+ self.sched_network_retries = _yaml.node_get(scheduler, int, 'network-retries')
profile_end(Topics.LOAD_CONTEXT, 'load')