overdrivemachines / admin_dashboard_sidekiq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

Sidekiq Background Jobs With Admin Dashboard

Following Youtube Guide: https://www.youtube.com/watch?v=fUVTtTVJ_QY

Preview

Model

Generated by Rails ERD. Run rails erd to regenerate (must have graphviz). ERD Diagram

Versions

  • ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
  • Rails 7.0.8

System dependencies

Redis - https://redis.io/docs/getting-started/installation/install-redis-on-linux/

Configuration

  • If bin/dev does not work, try running: $ gem install foreman
  • Kill redis:
ps aux | grep redis
sudo kill -9 51066
  • In Procfile.dev add the following:
sidekiq: bundle exec sidekiq -C config/sidekiq.yml
  • Create file config/sidekiq.yml
  • Create new Sidekiq job: rails g sidekiq:job hello. This is create a file app/sidekiq/hello_job.rb.
  • Reference the job in the controller as: HelloJob.perform_at(5.seconds.from_now) or HelloJob.perform_async()

References

About


Languages

Language:Ruby 85.3%Language:HTML 11.3%Language:JavaScript 1.7%Language:CSS 1.3%Language:Shell 0.4%