From 68801a66feb1466e0011d25944c6f6ce2167d7a5 Mon Sep 17 00:00:00 2001 From: mikespook Date: Mon, 26 Sep 2011 14:25:14 +0800 Subject: [PATCH] the Job was out of use. --- src/gearman/gearman.go | 5 ----- src/gearman/worker.go | 3 +-- src/gearman/workerjob.go | 2 -- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/gearman/gearman.go b/src/gearman/gearman.go index f8ae0c6..560612b 100644 --- a/src/gearman/gearman.go +++ b/src/gearman/gearman.go @@ -79,11 +79,6 @@ const ( JOB_HIGH = 4 ) -// No use -type Job interface { - Encode() []byte -} - // Extract the error message func getError(data []byte) (eno os.Errno, err os.Error) { rel := bytes.SplitN(data, []byte{'\x00'}, 2) diff --git a/src/gearman/worker.go b/src/gearman/worker.go index e29f779..ec2b8e9 100644 --- a/src/gearman/worker.go +++ b/src/gearman/worker.go @@ -8,7 +8,6 @@ import ( "os" "sync" "bytes" - // "log" ) // The definition of the callback function. @@ -67,7 +66,7 @@ func (worker *Worker) AddServer(addr string) (err os.Error) { defer worker.mutex.Unlock() if len(worker.clients) == cap(worker.clients) { - return os.NewError("There were too many clients.") + return os.NewError("To many servers added.") } // Create a new job server's client as a agent of server diff --git a/src/gearman/workerjob.go b/src/gearman/workerjob.go index ec2bbb3..a9b2c2d 100644 --- a/src/gearman/workerjob.go +++ b/src/gearman/workerjob.go @@ -7,7 +7,6 @@ package gearman import ( "os" "strconv" - // "log" ) // Worker side job @@ -16,7 +15,6 @@ type WorkerJob struct { Handle, UniqueId string client *jobClient magicCode, DataType uint32 - Job } // Create a new job