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

Change ModerationNotificationJob to ModerationNotificationWorker and move to sidekiq #5683

Merged
merged 5 commits into from
Jan 28, 2020
Merged

Change ModerationNotificationJob to ModerationNotificationWorker and move to sidekiq #5683

merged 5 commits into from
Jan 28, 2020

Conversation

luchiago
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Related Tickets & Documents

#5305

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Added to documentation?

  • docs.dev.to
  • readme
  • no documentation needed

[optional] What gif best describes this PR or how it makes you feel?

alt_text

@luchiago luchiago requested a review from a team January 23, 2020 22:22
@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Jan 23, 2020
@@ -82,7 +82,7 @@ def send_moderation_notification(notifiable)
# TODO: make this work for articles in the future. only works for comments right now
return if UserBlock.blocking?(notifiable.commentable.user_id, notifiable.user_id)

Notifications::ModerationNotificationJob.perform_later(notifiable.id)
Notifications::ModerationNotificationWorker.perform_async(notifiable.id)
Copy link
Contributor

Choose a reason for hiding this comment

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

This method is called from comment in an after_create callback which means nothing has been committed to the database yet. We need to change that comment callback to be after_create_commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure @mstruve. I'll send the changes. Thanks for reviewing.

@pr-triage pr-triage bot added PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes and removed PR: unreviewed bot applied label for PR's with no review labels Jan 23, 2020
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes labels Jan 24, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

The code seems good, you just need to fix spec/services/notifications/moderation/send_spec.rb:16 which is currently broken.

Thank you!

@pr-triage pr-triage bot added PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes and removed PR: unreviewed bot applied label for PR's with no review labels Jan 24, 2020
@luchiago
Copy link
Contributor Author

The code seems good, you just need to fix spec/services/notifications/moderation/send_spec.rb:16 which is currently broken.

Thank you!

Sure @rhymes. I'll fix it

@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes labels Jan 27, 2020
Copy link
Contributor

@atsmith813 atsmith813 left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Jan 27, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

LGTM!

@mstruve mstruve merged commit 587d104 into forem:master Jan 28, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants