[ARVADOS] updated: bb73dc995ffd3fcc05ff579f2aa0f8bf9b479f4a
Git user
git at public.curoverse.com
Thu Jun 9 16:21:46 EDT 2016
Summary of changes:
sdk/go/dispatch/dispatch.go | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
via bb73dc995ffd3fcc05ff579f2aa0f8bf9b479f4a (commit)
from 2c4ff054b533c62ecdb269963d3ab0af20d2df8b (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 bb73dc995ffd3fcc05ff579f2aa0f8bf9b479f4a
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Jun 9 16:21:36 2016 -0400
9187: Add comments.
diff --git a/sdk/go/dispatch/dispatch.go b/sdk/go/dispatch/dispatch.go
index 3356995..54d596f 100644
--- a/sdk/go/dispatch/dispatch.go
+++ b/sdk/go/dispatch/dispatch.go
@@ -102,9 +102,9 @@ func (dispatcher *Dispatcher) notMine(uuid string) {
}
}
-// Check if there is a channel for updates associated with this container. If
-// so (and update is true) send the container record on the channel and return
-// true, if not return false.
+// checkMine returns true/false if there is a channel for updates associated
+// with container c. If update is true, also send the container record on
+// the channel.
func (dispatcher *Dispatcher) checkMine(c Container, update bool) bool {
dispatcher.mineMutex.Lock()
defer dispatcher.mineMutex.Unlock()
@@ -177,6 +177,10 @@ func (dispatcher *Dispatcher) pollContainers() {
func (dispatcher *Dispatcher) handleUpdate(container Container) {
if container.State == Queued && dispatcher.checkMine(container, false) {
+ // If we previously started the job, something failed, and it
+ // was re-queued, this dispatcher might still be monitoring it.
+ // Stop the existing monitor, then try to lock and run it
+ // again.
dispatcher.notMine(container.UUID)
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list