summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-11 21:46:03 +0300
committerWolfy-J <[email protected]>2018-06-11 21:46:03 +0300
commitaba7704b71a00294b38a995e3ecadd0bd7cc6c12 (patch)
treeb8da096852811dd6240676aa839674ae1451ce3f
parent2b626f392f8884573aa26d51d4df9d16136a282e (diff)
no library dependency
-rw-r--r--.travis.yml2
-rw-r--r--state.go5
-rw-r--r--worker.go3
3 files changed, 9 insertions, 1 deletions
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
}