Skip to content
Next-gen background job processing 🏭
Branch: master
Clone or download
Latest commit a95b902 Feb 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CNAME initial release Jan 28, 2019
README.md Update README.md Feb 15, 2019
_config.yml initial release Jan 28, 2019

README.md

About

Worcr is a GPL-licensed background job processor. It is extremely fast (up to 100k no-op jobs per second on a single process) and doesn't have any back-end dependencies (it uses embedded SQLite database). Worcr is built on Crystal, which syntax is pretty much similar to Ruby's:

require "worcr/worker"
require "worcr/job"

struct Jobs::Email::Greet
  include Worcr::Job
  
  def initialize(@email : String)
  end
  
  def perform(client)
    client.send(@email, "Welcome!")
  end
end

class Workers::Emailer < Worcr::Worker(Jobs::Email::Greet)
  def initialize
    @client = EmailClient.new(ENV["API_TOKEN"])
  end
  
  def perform(job)
    job.perform(client)
  end
end

worker = Workers::Emailer.new
worker.work
You can’t perform that action at this time.