Background job processing used in @atomframework
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
spec
src
.editorconfig
.gitignore
.travis.yml
README.md
shard.yml

README.md

⚛️ Atom::Jobs

Built with Crystal Build status Docs Releases Awesome

A background jobs processor.

About

This is a Crystal Redis-based background jobs processing framework alternative to sidekiq and mosquito. It's a part of Atom Framework and is the most easy to use with.

Installation

Add this to your application's shard.yml:

dependencies:
  atom-jobs:
    github: atomframework/jobs

Usage

Without Atom

Application side:

require "atom-jobs"

struct Jobs::Nap
  include Atom::Job

  def initialize(@sleep : Int32 = 1)
  end

  def perform
    sleep(@sleep)
  end
end

jobs = Atom::Jobs.new
jobs.enqueue(Jobs::Nap.new(3))

Worker side:

require "atom-jobs"

jobs = Atom::Jobs.new
jobs.run

With Atom

Application side:

require "atom/jobs" # Note the slash

Atom.enqueue(Jobs::Nap.new(3))

Worker side:

require "atom/jobs"

Atom.work

Development

TODO: Write development instructions here

Contributing

  1. Fork it (https://github.com/atomframework/jobs/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors