The way to add configuration to Disc - Disc::Job#disc - was inspired by Sidekiq's sidekiq_options.
Recently, a discussion in a pull request made me think on wether we want this to be the case, maybe explicit accessors would be better, something along the lines of:
require 'disc'
class CreateGameGrid
include Disc::Job
self.queue = 'urgent'
def perform(type)
# perform rather lengthy operations here.
end
end
I find myself growing on the idea, as the Disc job configuration options are simply pieces of data, and it would make sense for it to be manipulated just as you would manipulate any other variable in Ruby.
I would like some more opinions/discussion on it before I implement it though, if anybody has them.
The way to add configuration to Disc -
Disc::Job#disc
- was inspired by Sidekiq'ssidekiq_options
.Recently, a discussion in a pull request made me think on wether we want this to be the case, maybe explicit accessors would be better, something along the lines of:
I find myself growing on the idea, as the Disc job configuration options are simply pieces of data, and it would make sense for it to be manipulated just as you would manipulate any other variable in Ruby.
I would like some more opinions/discussion on it before I implement it though, if anybody has them.