Apartment::Activejob
ActiveJob support for Apartment with Que support
All credit goes to the original gem apartment-activejob
I have only added support for using this with Que.
Installation
Add this line to your application's Gemfile:
gem 'apartment-activejob-que'
And then execute:
$ bundle
Or install it yourself as:
$ gem install apartment-activejob-que
Usage
Create a new initialization file active_job.rb in your project with the contents
require "apartment/active_job"
class ActiveJob::Base
include Apartment::ActiveJob
end
You will need to restart your rails server for this to take effect.
Enqueuing jobs will automatically place them in the public tenant. When the job is worked, it will be worked on the tenant it was created on.
Contributing
- Fork it ( https://github.com/[my-github-username]/apartment-activejob/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request