MCPcopy Create free account
hub / github.com/MG-RAST/Shock / unlock

Method unlock

shock-server/node/locker/locker.go:106–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106func (n *NodeLock) unlock() {
107 if lockDebug {
108 fmt.Printf("start NodeLock.unlock gid=%d node=%s\n", getGID(), n.Id)
109 }
110 n.IsLocked = false
111 n.Updated = time.Now()
112 n.writeLock <- 1 // Release the ticket
113 if lockDebug {
114 fmt.Printf("end NodeLock.unlock gid=%d node=%s\n", getGID(), n.Id)
115 }
116}
117
118func (l *NodeLocker) LockNode(id string) (err error) {
119 l.Add(id)

Callers 1

UnlockNodeMethod · 0.80

Calls 1

getGIDFunction · 0.85

Tested by

no test coverage detected