diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 320: increase the number of retry and decrease the wait time for _deploy_tarball_to_board method

Message ID 20120611020313.27333.86413.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Yongqin Liu June 11, 2012, 2:03 a.m. UTC
Merge authors:
  Yongqin Liu (liuyq0307)
Related merge proposals:
  https://code.launchpad.net/~liuyq0307/lava-dispatcher/update_retry_number_and_wait_time/+merge/109296
  proposed by: Yongqin Liu (liuyq0307)
  review: Approve - Michael Hudson-Doyle (mwhudson)
------------------------------------------------------------
revno: 320 [merge]
committer: Yongqin Liu <yongqin.liu@linaro.org>
branch nick: lava-dispatcher
timestamp: Mon 2012-06-11 10:00:56 +0800
message:
  increase the number of retry and decrease the wait time for _deploy_tarball_to_board method
modified:
  lava_dispatcher/client/master.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/client/master.py'
--- lava_dispatcher/client/master.py	2012-06-06 04:10:19 +0000
+++ lava_dispatcher/client/master.py	2012-06-08 06:22:05 +0000
@@ -69,7 +69,7 @@ 
 
 WGET_DEBUGGING_OPTIONS='-S --progress=dot -e dotbytes=2M'
 
-def _deploy_tarball_to_board(session, tarball_url, dest, timeout=-1, num_retry=2):
+def _deploy_tarball_to_board(session, tarball_url, dest, timeout=-1, num_retry=5):
     decompression_char = ''
     if tarball_url.endswith('.gz') or tarball_url.endswith('.tgz'):
         decompression_char = 'z'
@@ -94,9 +94,9 @@ 
         if num_retry > 1:
             # send CTRL C in case wget still hasn't exited.
             session._client.proc.sendcontrol("c")
-            session._client.proc.sendline("echo 'retry left %s'" % (num_retry-1))
+            session._client.proc.sendline("echo 'retry left %s time(s)'" % (num_retry-1))
             # And wait a little while.
-            sleep_time=5*60
+            sleep_time = 60
             logging.info("Wait %d second before retry" % sleep_time)
             time.sleep(sleep_time)
         num_retry = num_retry - 1