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

Remove useless removing algolia indexing on article destroy #1807

Merged

Conversation

lightalloy
Copy link
Contributor

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

  • Refactor

Description

When an article is destroyed,trigger_delayed_index was useless, cause trigger_delayed_index runs after_destroy, so this check record.&persisted? was always false and record.delay.remove_from_index! wasn't executed. An article is actually removed from the index in before_destroy_actions (remove_algolia_index).
This pr removes the useless code to make the logic easier to understand.

Related Tickets & Documents

Related to the #1641, thought this pr doesn't provide any fixes.

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Feb 15, 2019
@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 Feb 16, 2019
@benhalpern benhalpern merged commit 28bac35 into forem:master Feb 16, 2019
@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 Feb 16, 2019
@lightalloy lightalloy deleted the clarify-article-remove-from-algolia branch February 18, 2019 08:57
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

2 participants