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

schedule visitor cleaner job #327

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

schedule visitor cleaner job #327

wants to merge 1 commit into from

Conversation

michelson
Copy link
Member

No description provided.

Copy link
Contributor

@olimart olimart left a comment

Choose a reason for hiding this comment

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

Hi, sorry I came across and could not resist commenting.

queue_as :default

def perform(*args)
days_to_remove = 5.days.ago
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi. I would extract to a constant

class VisitorCleanerJob < ApplicationJob
  NB_DAYS = 5 # or even 5.days.ago
  
  def perform(*args)
    days_to_remove = NB_DAYS.days.ago
  end
end

Copy link
Member Author

Choose a reason for hiding this comment

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

this could also be an ENV configuration variable.

spec/jobs/email_chat_notifier_job_spec.rb Show resolved Hide resolved
@codeclimate
Copy link

codeclimate bot commented Apr 12, 2023

Code Climate has analyzed commit 204105a and detected 0 issues on this pull request.

View more on Code Climate.

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