Skip to content
A Beanstalkd backed asynchronous priority queue
Find file
Failed to load latest commit information.
lib Implementing invoker
spec Testing Postpone::Worker
.gitignore Init commit
.rspec Implementing invoker
Gemfile Init commit
LICENSE Init commit Adding info about beanstalkd bin
Rakefile Init commit
postpone.gemspec Minor error in gemspec


A Beanstalkd backed asynchronous priority queue.

Why beanstalkd?

In contrast to other asynchronous priority queues Beanstalkd doesn't use
polling behind the scene. This means that your jobs will start faster.


Add this line to your application's Gemfile:

gem "postpone"

And then execute:

$ bundle

Or install it yourself as:

$ gem install postpone

Don't forget to install and start the beanstalkd bin.


Call postpone on any given object to postpone the execution.


Postpone cannot postpone blocks. Why is explained here.

User.first.postpone.notify! { "How do you do?" }


Postpone is build on top of beanstalkd and stalker which means that you need an external worker.

Creating a worker

Create a file called jobs.rb and add the following code to it

require "postpone/worker"

Add your own worker to the same file, if you have any.
Take a look at the official stalker repo for more information.

Stalker::job "email.send" do |args|
  Pony.send(to: args['to'], subject: "Hello there")

Start your worker using stalk jobs.rb


Keep in mind that the object you are trying to postpone needs to be available on both sides. So if you're trying to postpone an operation on a rails object you need to load the rails environment on the worker side too.

# Loading rails
require File.expand_path("../environment", __FILE__)

# Loading postpone
require "postpone/worker"



Start by installing rspec.
Then, run the tests using rspec .


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


Postpone is released under the MIT License.

Something went wrong with that request. Please try again.