-
Notifications
You must be signed in to change notification settings - Fork 0
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 / Sidekiq Pro to project #1
Open
afinetooth
wants to merge
18
commits into
master
Choose a base branch
from
sidekiq
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…y of configuring Sidekiq for both development and production environments. Sidekiq will always try to connect to redis at localhost:6379, which is the default configuration for a local install. However, on Heroku, Sidekiq will connect to whatever redis instance is stored in the env variable REDIS_PROVIDER. Eliminating config/initializers/sidekiq.rb lets Sidekiq do its thing on Heroku with the least amount of extra work.
…eues: critical, default and low. Gave critical queue a weight of 2, which means it will be checked twice as often as the other queues. The ordering of queues specifies the order in which the queues will be processed.
…ueue to our ‘default’ queue.
…o be run with: foreman start -f Procfile.dev.
…il.logger due to context and removing “Rails” makes logging look more parallel between Jobs and Workers and helps in explaining logging differences between them. (See README.)
afinetooth
changed the title
Spike adding Sidekiq / Sidekiq Pro to project
Add Sidekiq / Sidekiq Pro to project
Feb 27, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Nick,
This is a tiny work sample in PR format to simulate working together.
I asked about one of your next backlog stories and you mentioned adding Sidekiq / Sidekiq Pro to your project. It's a good story for this because it doesn't require knowledge of your existing app. On the other hand it might not be ideal because it's not a discrete feature with acceptance criteria I could demonstrate meeting with tests.
Speaking of tests, I had hoped to include some, but honestly, I wasted time with a complicated background job I made up based on assumptions about your domain, and then realized I didn't have time to proceed. So, I decided to just focus on the core of the story and re-cast it as something more completable--a spike:
Story
Add Sidekiq to improve background job performance
Description
Spike adding Sidekiq to the project and examine changes required to integrate a concurrent job runner.
Concerns / Criteria
Complexity
1 point (or ~0.5-1 days)
The main work here was getting Rails + Sidekiq running on Heroku in order to create some runnable examples in production. A lot of the rest was writing the instructions to deploy to production in the README.
The code itself is minimal but gives the picture of how to wire up Sidekiq for both development and production environments.
I suspect you know a lot about Sidekiq, but if not then I hope the rest of the README is useful. I imagined how I'd create such as PR for the purpose of a code review by a lead engineer or a full team where this might be the team's first exposure.
Totally could have added some tests here for two very basic classes, HardJob and HardWorker, but I did run out of time so I decided I'll pull up some old code showing how we tested some of our old background workers in mc supply.
Thanks,
James