From 90f2fd21e897cc2d1b6498589458572f45856119 Mon Sep 17 00:00:00 2001 From: Alex Zylman Date: Mon, 30 Dec 2013 14:14:19 -0800 Subject: [PATCH] expose job handle/uniqueId --- worker/inpack.go | 8 ++++++++ worker/job.go | 2 ++ 2 files changed, 10 insertions(+) diff --git a/worker/inpack.go b/worker/inpack.go index 68d9928..3a18e46 100644 --- a/worker/inpack.go +++ b/worker/inpack.go @@ -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) diff --git a/worker/job.go b/worker/job.go index d2d7d6f..7ef28de 100644 --- a/worker/job.go +++ b/worker/job.go @@ -6,4 +6,6 @@ type Job interface { SendWarning(data []byte) SendData(data []byte) UpdateStatus(numerator, denominator int) + Handle() string + UniqueId() string }