Browse Source

the Job was out of use.

tags/0.0.1
mikespook 12 years ago
parent
commit
68801a66fe
3 changed files with 1 additions and 9 deletions
  1. +0
    -5
      src/gearman/gearman.go
  2. +1
    -2
      src/gearman/worker.go
  3. +0
    -2
      src/gearman/workerjob.go

+ 0
- 5
src/gearman/gearman.go View File

@@ -79,11 +79,6 @@ const (
JOB_HIGH = 4 JOB_HIGH = 4
) )


// No use
type Job interface {
Encode() []byte
}

// Extract the error message // Extract the error message
func getError(data []byte) (eno os.Errno, err os.Error) { func getError(data []byte) (eno os.Errno, err os.Error) {
rel := bytes.SplitN(data, []byte{'\x00'}, 2) rel := bytes.SplitN(data, []byte{'\x00'}, 2)


+ 1
- 2
src/gearman/worker.go View File

@@ -8,7 +8,6 @@ import (
"os" "os"
"sync" "sync"
"bytes" "bytes"
// "log"
) )


// The definition of the callback function. // The definition of the callback function.
@@ -67,7 +66,7 @@ func (worker *Worker) AddServer(addr string) (err os.Error) {
defer worker.mutex.Unlock() defer worker.mutex.Unlock()


if len(worker.clients) == cap(worker.clients) { 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 // Create a new job server's client as a agent of server


+ 0
- 2
src/gearman/workerjob.go View File

@@ -7,7 +7,6 @@ package gearman
import ( import (
"os" "os"
"strconv" "strconv"
// "log"
) )


// Worker side job // Worker side job
@@ -16,7 +15,6 @@ type WorkerJob struct {
Handle, UniqueId string Handle, UniqueId string
client *jobClient client *jobClient
magicCode, DataType uint32 magicCode, DataType uint32
Job
} }


// Create a new job // Create a new job


Loading…
Cancel
Save