javan / javan/whenever

Action Cable with whenever not working

Open
#722 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
8.9k
Forks
715
PR merge metrics
No merged PRs in 30d

Description

I am doing a application with redis-server but when I do broadcast from my schedule.rb the output console say than It has been send, but never my action cable receive.
this is my file

# schedule.rb
ENV.each { |k, v| env(k, v) }
every '*/3 * * * *' do
    runner "Driver.check_driver_logged",:environment => 'development'
end
# file converted to crontab
*/3 * * * * /bin/bash -l -c 'cd /home/bpdarlyn/proyectos/trackdio_web && bundle exec bin/rails runner -e development '\''Driver.check_driver_logged'\'' >> ~/proyectos/trackdio_web/log/cron_log.log 2>&1'
# this method is executed on Driver.check_driver_logged
ActionCable.server.broadcast "#{tenant}", tracking.try(:driver).try(:prepare_marker_drive)

do you have any idea why the broadcast method no send streaming from crontab ?

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 with schedule.rb and the generated crontab entry, then trace Driver.check_driver_logged through the ActionCable.server.broadcast call. Compare the cron-run environment with the development process and Redis setup; done means identifying why the broadcast is not received and documenting or verifying the required configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, redis, ruby
Domain
backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.