summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Callaghan <dcallagh@redhat.com>2010-12-14 13:25:53 +1000
committerGerrit Code Review <gerrit@maeby.djc.id.au>2010-12-14 13:25:53 +1000
commit238e15e0340ac18cb00cdbbfc12a28251b082b03 (patch)
treef395029d9e91e47a7bc0cccdc0df6dd85f1fdf6c
parentb2b49e5b9f9df9bc7313f78ad9584471c2d51c5e (diff)
parent0b53c4b08aa22d8129818859689eb6702378dcbc (diff)
Merge "bz662799 - beaker-transfer needlessly logins" into develop
-rw-r--r--LabController/proxy/src/bkr/labcontroller/transfer.py7
-rw-r--r--LabController/proxy/src/bkr/labcontroller/watchdog.py3
2 files changed, 7 insertions, 3 deletions
diff --git a/LabController/proxy/src/bkr/labcontroller/transfer.py b/LabController/proxy/src/bkr/labcontroller/transfer.py
index db14378..2b4062f 100644
--- a/LabController/proxy/src/bkr/labcontroller/transfer.py
+++ b/LabController/proxy/src/bkr/labcontroller/transfer.py
@@ -53,14 +53,17 @@ def main_loop(conf=None, foreground=False):
add_stderr_logger(transfer.logger)
now = datetime.now()
+ transfer.hub._login()
while True:
try:
- # Poll the scheduler for watchdogs
- transfer.hub._login()
if datetime.now() > now:
+ transfer.hub._login()
# Look for logs to transfer
now = datetime.now() + timedelta(minutes=30)
transfer.transfer_logs()
+ else:
+ transfer.logger.debug(80 * '-')
+ transfer.sleep()
# write to stdout / stderr
sys.stdout.flush()
diff --git a/LabController/proxy/src/bkr/labcontroller/watchdog.py b/LabController/proxy/src/bkr/labcontroller/watchdog.py
index 1ce48bc..70900a0 100644
--- a/LabController/proxy/src/bkr/labcontroller/watchdog.py
+++ b/LabController/proxy/src/bkr/labcontroller/watchdog.py
@@ -53,11 +53,12 @@ def main_loop(conf=None, foreground=False):
add_stderr_logger(watchdog.logger)
expire_active = datetime.now()
+ watchdog.hub._login()
while True:
try:
# Poll the scheduler for watchdogs
- watchdog.hub._login()
if datetime.now() > expire_active:
+ watchdog.hub._login()
expire_active = datetime.now() + timedelta(seconds=60)
watchdog.expire_watchdogs()
watchdog.active_watchdogs()