[ARVADOS] updated: d836ae6711f710c05980d606ee5bd017587ecbc1

Git user git at public.curoverse.com
Fri May 20 13:48:47 EDT 2016


Summary of changes:
 services/keep-balance/main.go | 5 +++++
 1 file changed, 5 insertions(+)

       via  d836ae6711f710c05980d606ee5bd017587ecbc1 (commit)
      from  ae2d40d821f0e8d81d9ba6468980b5eea278a5ed (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d836ae6711f710c05980d606ee5bd017587ecbc1
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri May 20 13:48:31 2016 -0400

    9162: Reset timer when waking up on SIGUSR1

diff --git a/services/keep-balance/main.go b/services/keep-balance/main.go
index d126ecc..41a2567 100644
--- a/services/keep-balance/main.go
+++ b/services/keep-balance/main.go
@@ -124,6 +124,11 @@ func RunForever(config Config, runOptions RunOptions) error {
 		select {
 		case <-ticker.C:
 		case <-sigUSR1:
+			log.Print("received SIGUSR1, resetting timer")
+			// Reset the timer so we don't wake up too
+			// soon after a run triggered by SIGUSR1.
+			ticker.Stop()
+			ticker = time.NewTicker(time.Duration(config.RunPeriod))
 		}
 		log.Print("waking up")
 	}

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list