diff --git a/event.go b/event.go index 017d325..8115ba0 100644 --- a/event.go +++ b/event.go @@ -309,9 +309,11 @@ func LockResources(event Event) error { for _, resource := range(locked_resources) { UnlockResource(resource, event) } + log.Logf("event", "RESOURCE_LOCK_FAIL for %s: %s", event.Name(), lock_err) return lock_err } + log.Logf("event", "RESOURCE_LOCK_SUCCESS for %s", event.Name()) signal := NewDownSignal(event, "locked") SendUpdate(event, signal) diff --git a/resource.go b/resource.go index 9191121..22b1f8c 100644 --- a/resource.go +++ b/resource.go @@ -52,10 +52,16 @@ type Resource interface { LockState() UnlockState() + String() string + lock(node GraphNode) error unlock(node GraphNode) error } +func (resource * BaseResource) String() string { + return resource.Name() +} + // Recurse up cur's parents to ensure r is not present func checkIfParent(r Resource, cur Resource) bool { if r == nil || cur == nil {