Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sidekiq #291

Merged
merged 4 commits into from
Apr 20, 2022
Merged

Add sidekiq #291

merged 4 commits into from
Apr 20, 2022

Conversation

rohitjoshixyz
Copy link
Contributor

@rohitjoshixyz rohitjoshixyz commented Apr 19, 2022

Notion card

https://www.notion.so/Add-sidekiq-for-background-job-processing-0f2e618cda454d6980db0826cf202f8d

Summary

Followed: https://www.bigbinary.com/learn-rubyonrails-book/background-job-processing-using-sidekiq
Verified queuing is working by creating a job that puts "Sidekiq job executed" into the console.
Updated the readme to mention installing Redis.

Preview

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • I have manually tested all workflows
  • I have performed a self-review of my own code
  • I have added automated tests for my code

@pr-triage pr-triage bot added the PR: draft label Apr 19, 2022
@github-actions
Copy link

Current Code Coverage Percent of this PR:

98.17 %

Files having coverage below 100%

Impacted Files Coverage
/app/controllers/clients_controller.rb 38.89 %
/app/controllers/concerns/error_handler.rb 97.73 %
/app/models/project.rb 90.32 %

@rohitjoshixyz rohitjoshixyz marked this pull request as ready for review April 19, 2022 13:13
Copy link
Contributor

@keshavbiswa keshavbiswa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@shivamsinghchahar shivamsinghchahar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohitjoshixyz Suggested some changes 👇

Also, Can't find the Procfile for production, we'd want to add worker command to that as well.

config/application.rb Outdated Show resolved Hide resolved
Comment on lines +5 to +6
:queues:
- default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:queues:
- default
queues:
- default
- mailers
- action_mailbox_routing
- action_mailbox_incineration
- active_storage_analysis
- active_storage_purge

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this https://mikerogers.io/2019/06/06/rails-6-sidekiq-queues Are you suggesting adding them for the same reason? Are they used internally by active storage automatically or do we need more configuration? @shivamsinghchahar

Copy link
Contributor

@shivamsinghchahar shivamsinghchahar Apr 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly 💯

That's all we need, no additional configuration.

@shivamsinghchahar
Copy link
Contributor

shivamsinghchahar commented Apr 19, 2022

@rohitjoshixyz Another thing is sidekiq web UI, could we add that as well.

Add Procfile for production
Add more queues for active storage
Remove sidekiq for test env
Copy link
Contributor

@shivamsinghchahar shivamsinghchahar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohitjoshixyz Just some minor changes, Rest LGTM

Procfile Outdated Show resolved Hide resolved
Procfile Outdated Show resolved Hide resolved
Copy link
Contributor

@shivamsinghchahar shivamsinghchahar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@rohitjoshixyz rohitjoshixyz merged commit adea063 into develop Apr 20, 2022
@rohitjoshixyz rohitjoshixyz deleted the add-sidekiq branch April 20, 2022 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants