Skip to content

ghais/goresque

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goresque

Build Status Coverage Status

A Simple Resque queue client for Go.

Installation

go get github.com/ghais/goresque

Usage

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
end

So, 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")
}

Documentation

Contributing

Fork and send a pull request.

Note

This package was based on go-resque

About

A simple client for Resque

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages