diff --git a/belt/queue-remote.go b/belt/queue-remote.go index 8429ce3..38c14ab 100644 --- a/belt/queue-remote.go +++ b/belt/queue-remote.go @@ -28,8 +28,11 @@ func NewRemoteQueue(addr string) (*RemoteQueue, error) { }, nil } -func (q *RemoteQueue) Push(*data.Execution) error { - panic("unimplemented") +func (q *RemoteQueue) Push(exec *data.Execution) error { + var abc interface{} + err := q.c.Call("Queue.Push", exec, abc) + + return err } func (q *RemoteQueue) Pop(wait bool) (*Execution, error) { diff --git a/rpc/queue.go b/rpc/queue.go index 0326f2a..a0b205f 100644 --- a/rpc/queue.go +++ b/rpc/queue.go @@ -11,6 +11,11 @@ import ( type Queue struct{} +func (q *Queue) Push(exec *data.Execution, reply *interface{}) error { + err := belt.Queue.Push(exec) + return err +} + func (q *Queue) Pop(args int, reply *data.Execution) error { exec, err := belt.Queue.Pop(false) if err != nil {