diff options
author | Valery Piashchynski <[email protected]> | 2021-01-11 13:00:52 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-11 13:00:52 +0300 |
commit | c4112cd214a9c7cbed82c82eefc75904fb42d1af (patch) | |
tree | 680cc5f0d3f9a0d78a944e026568af61c12bd87e /server.go | |
parent | 5dc83ef5eee77f4d1ef557e5f8b566e75892680d (diff) |
Update CI
Format imports and code
Distinct internal and app errors
Diffstat (limited to 'server.go')
-rw-r--r-- | server.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,9 +1,9 @@ package roadrunner import ( - "fmt" - "github.com/pkg/errors" "sync" + + "github.com/pkg/errors" ) const ( @@ -133,11 +133,13 @@ func (s *Server) Stop() { s.throw(EventServerStop, s) } +var ErrNoAssociatedPool = errors.New("no associared pool") + // Exec one task with given payload and context, returns result or error. func (s *Server) Exec(rqs *Payload) (rsp *Payload, err error) { pool := s.Pool() if pool == nil { - return nil, fmt.Errorf("no associared pool") + return nil, ErrNoAssociatedPool } return pool.Exec(rqs) |