This commit is contained in:
Łukasz Magiera 2020-09-17 00:35:30 +02:00
parent d9d644b27f
commit 17680fff55
4 changed files with 8 additions and 7 deletions

View File

@ -211,7 +211,7 @@ Response:
```json ```json
{ {
"Version": "string value", "Version": "string value",
"APIVersion": 3840, "APIVersion": 3584,
"BlockDelay": 42 "BlockDelay": 42
} }
``` ```

View File

@ -23,6 +23,7 @@ func (w WorkID) String() string {
var _ fmt.Stringer = &WorkID{} var _ fmt.Stringer = &WorkID{}
type WorkStatus string type WorkStatus string
const ( const (
wsStarted WorkStatus = "started" // task started, not scheduled/running on a worker yet wsStarted WorkStatus = "started" // task started, not scheduled/running on a worker yet
wsRunning WorkStatus = "running" // task running on a worker, waiting for worker return wsRunning WorkStatus = "running" // task running on a worker, waiting for worker return
@ -198,7 +199,7 @@ func (m *Manager) waitWork(ctx context.Context, wid WorkID) (interface{}, error)
log.Errorf("marking work as done: %+v", err) log.Errorf("marking work as done: %+v", err)
} }
res := <- cr res := <-cr
delete(m.callRes, ws.WorkerCall) delete(m.callRes, ws.WorkerCall)
m.workLk.Unlock() m.workLk.Unlock()