Commit Graph

96 Commits

Author SHA1 Message Date
galih rivanto
81d00aa9ce add synchronization to prevent race condition on worker shutdown (#89)
* add synchronization to prevent race condition on worker shutdown

* fix incorrect synchronization and add race unit test

* fix race while broadcasting outpack
2019-05-28 18:41:20 +08:00
CodeLingo Bot
133dd3716f Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-02-28 02:11:17 +00:00
Christoffer Fjellström
f333ba6102 Fix job register with timeout set
Fixed issue where timeout is sent as binary encoded uint but server
expects a string
2019-02-13 11:45:35 +01:00
Sadlil Rhythom
5c665de2d6 fix worker reconnect errors, send cando after reconnection.
* fix worker reconnect errors, send cando after reconnection.
2018-11-19 17:10:05 +01:00
Christoffer Fjellström
e701107e40 Remove broken test suite
OS and configuration specific integration test
2017-09-27 16:42:48 +02:00
Christoffer Fjellström
99d317427f Add skipping for integration tests when running unit tests
Run integration tests with the -integration flag
2017-09-27 16:42:21 +02:00
JessonChan
99c8032384 fix a bug when high qps 2016-04-20 12:54:21 +08:00
Xing Xing
9dbb3ea3fc added lock-write to co-ordinate package sequence #56 2015-01-15 10:26:53 +08:00
Xing Xing
ad9b3cb988 go fmt 2015-01-06 11:45:18 +08:00
Xing Xing
a003eac543 fixed the closing method 2015-01-06 11:34:39 +08:00
Xing Xing
25735c8488 merge for issue #33 2014-12-10 09:13:49 +08:00
Joe Higton
97731e1774 FIX: EOF disconnect error also called raw handler afterwards 2014-06-10 04:09:27 +01:00
Joe Higton
09c626f488 Cope with io.EOF as a disconnect error 2014-06-10 03:46:21 +01:00
Joe Higton
1ebb3d5fcc Wrap disconnect errors and allow reconnect 2014-06-10 03:23:18 +01:00
Joe Higton
99bcf11768 FIX: The error handler is not called on disconnect
Using the disconnect test showed the agent was silently closing on disconnect
2014-06-07 07:22:40 +01:00
Joe Higton
7ddad76b85 Early stab at disconnect handling test 2014-06-07 06:14:28 +01:00
Joe Higton
2f72b28d76 FIX: waiting for worker fireup was making the test slow
Dodging the race condition with a sleep was fine, but we slept
for a whole second which was longer than this test takes to run!

I've scaled the sleep down to 250 miliseconds and increased the tries.

Even this is probably excessively long but now the test is fast agin.
2014-06-07 05:35:05 +01:00
Joe Higton
0a4489d1fe Fixed and improved Work() without Ready() test:
* FIX: committed test froze
* FIX: committed test had a race condition!
* Added properly handled panic test
* Timeouts so that these tests should fail now if something goes wrong instead of failing.
2014-06-04 13:31:25 +01:00
draxil
6688c29c37 Enahanced Work() without Ready() behaviour:
Now if you try to call Work() without calling Ready(), it will trigger an attempt to run Ready(), and will only panic if there is an error.
2014-06-01 16:59:57 +01:00
Joe Higton
24e93b4a2c More helpful panic if you call Work() before you call Ready() 2014-05-29 15:35:27 +01:00
Kevin Darlington
de91c999f7 Changed agent.read to handle big data. 2014-03-08 19:22:14 -05:00
Xing Xing
9d7a29fe26 Merge branch 'master' into 0.2-dev 2014-03-07 17:33:16 +08:00
Damian Gryski
7229235a4f Use %v instead of %V, which is not a valid Printf verb 2014-03-07 10:21:45 +01:00
Damian Gryski
ad0d49dcb2 Use fmt.Errorf() instead of errors.New(fmt.Sprintf()) 2014-03-07 10:20:39 +01:00
Xing Xing
76c76995d5 removed ErrLostConn from worker 2014-03-03 14:50:54 +08:00
Xing Xing
f880354a61 type assertion with *net.OpError 2014-03-03 14:45:35 +08:00
Xing Xing
0a6bacbe82 SUBMIT_JOB_SCHED is deprecated, worker.Immediately should be removed. 2014-01-16 09:43:06 +08:00
Xing Xing
2bd19fb2fb Merge branch 'master' into 0.2-dev 2014-01-15 09:38:41 +08:00
Sam Grimee
221e11861f keep already received data if not enough to decode 2014-01-14 17:06:20 +01:00
Sam Grimee
885609309c Continue reading incoming data until enough rcvd
This fixes the case of a large packet being received, the current code stops processing as soon as >12 bytes are received,
2014-01-14 12:59:52 +01:00
Xing Xing
87631cc2e5 go fmt & better examples 2014-01-09 17:58:02 +08:00
Xing Xing
e701be9288 Merge branch 'master' into 0.2-dev 2014-01-09 16:18:52 +08:00
Xing Xing
57337a6004 Merge branch 'master' of github.com:mikespook/gearman-go 2014-01-09 16:17:05 +08:00
Xing Xing
76196899f8 fxied issue #20 2014-01-09 16:16:34 +08:00
Xing Xing
47d03a8bb1 fixed WORK_STATUS package size 2014-01-09 14:55:51 +08:00
Xing Xing
e0171b4bde Merge branch 'master' into 0.2-dev 2014-01-04 15:07:34 +08:00
jake
94b00affec Bring back ability to get function name 2014-01-03 15:58:18 -05:00
Alex Zylman
90f2fd21e8 expose job handle/uniqueId 2013-12-30 14:14:19 -08:00
Xing Xing
d282ef337a benchmark for encoding/decoding 2013-12-29 17:09:06 +08:00
Xing Xing
9f96247384 fixed the worker's testing cases 2013-12-26 15:55:16 +08:00
Xing Xing
bf25cc1728 a better documents for the client package 2013-12-26 15:28:42 +08:00
Xing Xing
59941371fb Something should not display in documents, disabled. 2013-12-26 12:32:27 +08:00
Xing Xing
18791d0490 a better documents 2013-12-26 12:06:47 +08:00
Xing Xing
298edadfa6 a better doc 2013-12-25 18:11:01 +08:00
Xing Xing
02e6bfebcb prepared for documentation 2013-12-25 17:01:42 +08:00
Xing Xing
ddba5ab2f2 blocking on GRAB_JOB instead of executing blocked 2013-12-25 15:13:21 +08:00
Xing Xing
fbfe7c0b22 The limitation param was removed 2013-12-24 17:41:11 +08:00
Xing Xing
7db97fc31d package's test-case added 2013-12-24 16:35:17 +08:00
Xing Xing
bcff8f7e0d go fmt 2013-12-24 14:39:04 +08:00
Xing Xing
2da5f29cd1 refactoring complated 2013-12-24 14:35:33 +08:00