Browse Source

Tall server 'reset it' and clean the map.

tags/0.0.1
mikespook 13 years ago
parent
commit
da43d2efe5
3 changed files with 5 additions and 14 deletions
  1. +1
    -1
      src/pkg/gearman/client.go
  2. +1
    -12
      src/pkg/gearman/client_test.go
  3. +3
    -1
      src/pkg/gearman/worker.go

+ 1
- 1
src/pkg/gearman/client.go View File

@@ -4,7 +4,7 @@ import (
"os"
"net"
"sync"
"log"
// "log"
"strconv"
)



+ 1
- 12
src/pkg/gearman/client_test.go View File

@@ -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 {


+ 3
- 1
src/pkg/gearman/worker.go View File

@@ -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


Loading…
Cancel
Save