diff --git a/src/pkg/gearman/client.go b/src/pkg/gearman/client.go index 55577a3..a66cf2f 100644 --- a/src/pkg/gearman/client.go +++ b/src/pkg/gearman/client.go @@ -4,7 +4,7 @@ import ( "os" "net" "sync" - "log" +// "log" "strconv" ) diff --git a/src/pkg/gearman/client_test.go b/src/pkg/gearman/client_test.go index 065807d..fead96f 100644 --- a/src/pkg/gearman/client_test.go +++ b/src/pkg/gearman/client_test.go @@ -25,7 +25,7 @@ func TestClientEcho(t * testing.T) { t.Log(echo) } } -/* + func TestClientDo(t * testing.T) { if handle, err := client.Do("ToUpper", []byte("abcdef"), JOB_LOW | JOB_BG); err != nil { t.Error(err) @@ -33,17 +33,6 @@ func TestClientDo(t * testing.T) { t.Log(handle) } } -*/ -/* -func TestClientLastResult(t * testing.T) { - job := client.LastResult() - if job == nil { - t.Error(os.NewError("job shuold be the echo.")) - } else { - t.Log(job) - } -} -*/ func TestClientClose(t * testing.T) { if err := client.Close(); err != nil { diff --git a/src/pkg/gearman/worker.go b/src/pkg/gearman/worker.go index 79fed33..4dd0eaa 100644 --- a/src/pkg/gearman/worker.go +++ b/src/pkg/gearman/worker.go @@ -171,7 +171,9 @@ func (worker * Worker) Echo(data []byte) (err os.Error) { // Reset func (worker * Worker) Reset() (err os.Error){ job := NewWorkerJob(REQ, RESET_ABILITIES, nil) - return worker.WriteJob(job) + err = worker.WriteJob(job) + worker.functions = make(JobFunctionMap) + return } // SetId