From aba7704b71a00294b38a995e3ecadd0bd7cc6c12 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Mon, 11 Jun 2018 21:46:03 +0300 Subject: no library dependency --- .travis.yml | 2 +- state.go | 5 +++++ worker.go | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 612b9586..cf96dbe5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,4 +32,4 @@ after_success: - bash <(curl -s https://codecov.io/bash) -f lib.txt - bash <(curl -s https://codecov.io/bash) -f service.txt - bash <(curl -s https://codecov.io/bash) -f rpc.txt - - bash <(curl -s https://codecov.io/bash) -f http.txt + - bash <(curl -s https://codecov.io/bash) -f http.txt \ No newline at end of file diff --git a/state.go b/state.go index 4a1a8384..af29de50 100644 --- a/state.go +++ b/state.go @@ -26,6 +26,9 @@ const ( // StateWorking - working on given payload. StateWorking + // StateStreaming - indicates that worker is streaming the data at the moment. + StateStreaming + // StateStopping - process is being softly stopped. StateStopping @@ -54,6 +57,8 @@ func (s *state) String() string { return "ready" case StateWorking: return "working" + case StateStreaming: + return "streaming" case StateStopped: return "stopped" case StateErrored: diff --git a/worker.go b/worker.go index df45a1c8..811bda5f 100644 --- a/worker.go +++ b/worker.go @@ -186,6 +186,9 @@ func (w *Worker) Exec(rqs *Payload) (rsp *Payload, err error) { } } + // todo: attach when payload is complete + // todo: new status + w.state.set(StateReady) return rsp, err } -- cgit v1.2.3