resque / resque/resque-scheduler

resque-scheduler 4.2.0 not starting in BACKGROUND mode with BACKGROUND=yes

Open
#682 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
1.7k
Forks
477
PR merge metrics
No merged PRs in 30d

Description

I am unable to start resque:scheduler process in the background by using the BACKGROUND=yes flag. The command which i am using is:
BACKGROUND=yes /usr/bin/bundle exec /usr/bin/rake environment resque:scheduler RAILS_ENV=development
resque:scheduler process starts successfully after running this but the rake process doesn't exit as it should after providing the BACKGROUND=yes flag. After the schedules get loaded, instead of running the scheduler in the background, jobs start getting enqueued in the foreground:

resque-scheduler: [INFO] [Rails:4] 2019-07-17T18:50:18+00:00: Schedules Loaded
resque-scheduler: [INFO] [Rails:4] 2019-07-17T18:49:06+00:00: queueing RequeueThrottledJob (requeue_throttled_job)

Checked this on a different terminal:

[ec2-user@ip-10-146-98-218 ~]$ ps aux | grep resque | grep scheduler
ec2-user 24515 14.7  1.2 860552 380748 ?       Sl   18:50   0:04 resque-scheduler-4.2.0[development]: Schedules Loaded

Strange thing to note here is that this issue doesn't appear when using rails3 application. The rake process exits and resque:scheduler starts running in the background as soon as the schedules get loaded.
These are the OS and package versions i'm using:

  • OS - Amazon Linux 2
  • resque:scheduler - 4.2.0
  • ruby - 2.1.6
  • rails - 4.2.11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing BACKGROUND=yes /usr/bin/bundle exec /usr/bin/rake environment resque:scheduler RAILS_ENV=development with resque-scheduler 4.2.0 on the reported Rails 4.2 setup, then compare it with the Rails 3 behavior described. Done means the scheduler continues in the background after schedules load and the invoking rake process exits.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.