Commit Graph

42 Commits

Author SHA1 Message Date
Christoffer Fjellström
d6791e2e42 Add sync lock to create job functions
Add sync lock to make create job calls thread safe.
2017-01-16 16:44:48 +01:00
JessonChan
dd82e211a3 concurrent map bug fixed 2016-05-06 18:00:58 +08:00
Xing Xing
c6c6c9cac2 don't use sigillum 2015-07-10 20:30:35 +08:00
Endre Hirling
c615e74af8 Replace mutex in client.do() with a channel to avoid deadlock and introduce command timeout 2015-07-06 21:40:49 +02:00
Graham Barr
7bcc4de76f Do not ignore write errors 2014-08-20 11:27:32 -05:00
Graham Barr
d82da8fd71 Avoid read channel corruption when response size > bufferSize
When receiving a response, what was happening

1. Read bufferSize and it gets assigned to leftdata
2. Read another bufferSize
3. 2 buffers get appended, but leftdata still points to first buffer
4. Process data buffer which contains only complete responses
5. Back to ReadLoop, but leftdata still points to first incomplete buffer
    causing corrupt data to be processed

Solution is to make leftdata nil once we have merged it with the second buffer
2014-08-18 12:35:31 -05:00
Graham Barr
3e556edb2d When a job completes, remove its handler 2014-07-24 14:20:56 -05:00
Xing Xing
5334b50533 fixed #34 2014-03-11 10:03:00 +08:00
Xing Xing
f880354a61 type assertion with *net.OpError 2014-03-03 14:45:35 +08:00
Xing Xing
45a9d7c3e5 fixed #31 2014-03-03 11:40:42 +08:00
Xing Xing
87631cc2e5 go fmt & better examples 2014-01-09 17:58:02 +08:00
Xing Xing
76196899f8 fxied issue #20 2014-01-09 16:16:34 +08:00
Xing Xing
bf25cc1728 a better documents for the client package 2013-12-26 15:28:42 +08:00
Xing Xing
02e6bfebcb prepared for documentation 2013-12-25 17:01:42 +08:00
Xing Xing
3aa95042e6 merge, client need to refactor 2013-12-24 22:04:10 +08:00
Xing Xing
c8f2f5085c race is bad, how should we do? 2013-09-22 22:58:22 +08:00
Xing Xing
e5179e3b5b started refactoring worker 2013-08-30 18:01:10 +08:00
Xing Xing
124e686699 go fmt 2013-08-30 12:36:57 +08:00
Xing Xing
9daac76f67 removed outside dependency 2013-08-30 11:41:18 +08:00
Xing Xing
764dcf5f99 merge from paulmach 2013-08-30 11:27:41 +08:00
Xing Xing
358c8c4af0 processed ERROR package 2013-08-30 11:20:51 +08:00
Xing Xing
4997e30a77 runabled 0.2 2013-08-29 18:08:05 +08:00
Xing Xing
e5c30068cd 0.2 refactoring begining 2013-08-29 16:51:23 +08:00
Paul Mach
5e215b9257 Remove depenance on external libs for unique id 2013-08-25 22:49:00 -07:00
mikespook
8e009be940 #14 fixed 2013-04-24 16:58:06 +08:00
Paul Mach
f3b4013e2b Update and Receive status correctly 2013-04-23 11:45:57 -07:00
Xing Xing
011c3253f7 issue 'use of closed network connection' of client fixed 2013-04-23 21:41:56 +08:00
mikespook
568c70b083 #12 fixed 2013-04-23 16:58:06 +08:00
mikespook
7a8a5d4a6a for issue #10; an IdGenerator interface, use bson.ObjectId as default 2013-02-28 13:28:48 +08:00
Ingo Oeser
af4035284d do not generate unique id on background submission 2013-02-18 19:50:14 +01:00
Xing Xing
6619b9a10e move the auto-inc into the global 2013-02-03 21:34:13 +08:00
mikespook
af05460727 fixed the infinite loop of client 2013-01-24 18:13:02 +08:00
mikespook
16a965f52d An infinite loop ... :( 2013-01-23 17:25:38 +08:00
mikespook
c00234ba9a Refactoring the client api 2013-01-15 17:55:44 +08:00
mikespook
dbc06bf540 start refactoring... 2013-01-14 17:59:48 +08:00
mikespook
d6c6bfe9f0 moved to github 2012-12-21 11:11:37 +08:00
mikespook
624c61519f using time.After instead of a separate goroutine 2012-05-30 09:54:22 +08:00
mikespook
a8f7c8ab9d Read a empty data means connection error 2012-05-24 21:17:06 +08:00
mikespook
f14964bc81 add timeout to client.Do 2012-05-24 19:21:30 +08:00
mikespook
2960cb9953 refacotring worker's code
--HG--
branch : 0.1
rename : worker/jobagent.go => worker/agent.go
rename : worker/workerjob.go => worker/job.go
2012-05-23 17:45:52 +08:00
mikespook
563af037cb fixed client:Job.Encode
--HG--
branch : 0.1
2012-05-23 15:22:29 +08:00
mikespook
7614c2678a make a new branch, refactoring codes
--HG--
branch : 0.1
rename : gearman/client/client.go => client/client.go
rename : gearman/client/client_test.go => client/client_test.go
rename : gearman/client/clientjob.go => client/job.go
rename : gearman/gearman.go => common/gearman.go
rename : gearman/worker/jobagent.go => worker/jobagent.go
rename : gearman/worker/worker.go => worker/worker.go
rename : gearman/worker/worker_test.go => worker/worker_test.go
rename : gearman/worker/workerjob.go => worker/workerjob.go
2012-05-22 20:05:39 +08:00