Browse Source

Merge pull request #22 from azylman/master

expose job handle/uniqueId
tags/0.2
Xing 10 years ago
parent
commit
26ea07a917
2 changed files with 10 additions and 0 deletions
  1. +8
    -0
      worker/inpack.go
  2. +2
    -0
      worker/job.go

+ 8
- 0
worker/inpack.go View File

@@ -24,6 +24,14 @@ func (inpack *inPack) Data() []byte {
return inpack.data
}

func (inpack *inPack) Handle() string {
return inpack.handle
}

func (inpack *inPack) UniqueId() string {
return inpack.uniqueId
}

func (inpack *inPack) Err() error {
if inpack.dataType == dtError {
return getError(inpack.data)


+ 2
- 0
worker/job.go View File

@@ -6,4 +6,6 @@ type Job interface {
SendWarning(data []byte)
SendData(data []byte)
UpdateStatus(numerator, denominator int)
Handle() string
UniqueId() string
}

Loading…
Cancel
Save