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

Fix Scheduler::SubscriptionsScheduler #2834

Merged
merged 2 commits into from May 6, 2017
Merged

Fix Scheduler::SubscriptionsScheduler #2834

merged 2 commits into from May 6, 2017

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented May 6, 2017

Looks like a missing .each has slipped by. Added a test for it. Also Sidekiq has its own logger, use that instead of the Rails one. And change Sidekiq production log level to warn instead of info for less noise.

@Gargron Gargron requested a review from mjankowski May 6, 2017 10:51
include Sidekiq::Worker

def perform(status_id)
FanOutOnWriteService.new.call(Status.find(status_id))
rescue ActiveRecord::RecordNotFound
info("Couldn't find the status")
true
Copy link
Member Author

Choose a reason for hiding this comment

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

Just as a comment for future reference: we don't really care if this status is not found. For example, user deletes status right after sending it out. It might already be gone before this job gets executed. That's okay.

@Gargron Gargron merged commit b8e1668 into master May 6, 2017
@Gargron Gargron deleted the fix-push-scheduler branch May 6, 2017 11:05
Gargron added a commit that referenced this pull request May 6, 2017
* Fix Scheduler::SubscriptionsScheduler, add worker test for it

* Change production log level of Sidekiq to "warn" instead of "info"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants