options to skip rakefile
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 456
- Forks
- 149
- Avg merge
- 9d 7h
- Merged PRs (30d)
- 3
Description
By default we load the rakefile and run the resque:pool rake task, because that follows the instructions in the resque README. We can also provide the ability to run Resque::Pool.run directly, from inside the resque-pool daemonizing script.
--init, -i <s>: Preload ruby script to initialize resque-pool
--no-rake: Run without loading Rakefile or resque:pool task
to be run like so:
resque-pool -d -e production -i config/resque-pool-init.rb --no-rake
and config/resque-pool-init.rb might look like so:
require File.expand_path('environment', File.dirname(FILE))
# setup resque failure backend
# close any sockets or files in pool master
ActiveRecord::Base.connection.disconnect!
# and re-open them in the resque worker parent
Resque::Pool.after_prefork do |job|
ActiveRecord::Base.establish_connection
end
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the resque-pool daemonizing script and its existing --init handling. Trace how the Rakefile and resque:pool task are loaded, then verify that --no-rake can invoke Resque::Pool.run while an init script still loads and configures the environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100