A Simple Resque queue client for Go.
go get github.com/ghais/goresque
Let's assume that you have such Resque Job (taken from Resque examples):
module Demo
class Job
def self.Perform(params)
puts "Doing!"
end
end
endSo, we can enqueue this job from Go.
package main
import (
"github.com/ghais/goresque" // Import this package
)
func main() {
client, err := goresque.Dial("127.0.0.1:6379") // get a client
if err != nil {
//handle error
}
// Enqueue the job into the go queue.
resque.Enqueue("Demo::Job", "default")
// Enqueue into the "default" queue with passing one parameter to the Demo::Job.
resque.Enqueue("Demo::Job", "default", 1)
// Enqueue into the "default" queue with passing multiple
// parameters to the Demo::Job.perform so it will fail
resque.Enqueue("Demo::Job", "default", 1, 2, "woot")
}Fork and send a pull request.
This package was based on go-resque

