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

99019: Add deprecation warning and unschedule DR non-engine jobs #19941

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class DeleteSavedClaimRecordsJob
STATSD_KEY_PREFIX = 'worker.decision_review.delete_saved_claim_records'

def perform
ActiveSupport::Deprecation.new.warn("#{self.class.name} job is deprecated and will be replaced by DR engine job")

return unless enabled?

deleted_records = ::SavedClaim.where(delete_date: ..DateTime.now).destroy_all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class FailureNotificationEmailJob
STATSD_KEY_PREFIX = 'worker.decision_review.failure_notification_email'

def perform
ActiveSupport::Deprecation.new.warn("#{self.class.name} job is deprecated and will be replaced by DR engine job")

return unless should_perform?

send_form_emails
Expand Down
5 changes: 5 additions & 0 deletions app/sidekiq/decision_review/hlr_status_updater_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

module DecisionReview
class HlrStatusUpdaterJob < SavedClaimStatusUpdaterJob
def perform
ActiveSupport::Deprecation.new.warn("#{self.class.name} job is deprecated and will be replaced by DR engine job")
super
end

private

def records_to_update
Expand Down
5 changes: 5 additions & 0 deletions app/sidekiq/decision_review/nod_status_updater_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

module DecisionReview
class NodStatusUpdaterJob < SavedClaimStatusUpdaterJob
def perform
ActiveSupport::Deprecation.new.warn("#{self.class.name} job is deprecated and will be replaced by DR engine job")
super
end

private

def records_to_update
Expand Down
5 changes: 5 additions & 0 deletions app/sidekiq/decision_review/sc_status_updater_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

module DecisionReview
class ScStatusUpdaterJob < SavedClaimStatusUpdaterJob
def perform
ActiveSupport::Deprecation.new.warn("#{self.class.name} job is deprecated and will be replaced by DR engine job")
super
end

private

def records_to_update
Expand Down
11 changes: 0 additions & 11 deletions lib/periodic_jobs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,25 +226,14 @@
# Every 15min job that sends missing Pega statuses to DataDog
mgr.register('*/15 * * * *', 'IvcChampva::MissingFormStatusJob')

# Hourly jobs that update DR SavedClaims with delete_date
mgr.register('20 * * * *', 'DecisionReview::HlrStatusUpdaterJob')
mgr.register('30 * * * *', 'DecisionReview::NodStatusUpdaterJob')
mgr.register('50 * * * *', 'DecisionReview::ScStatusUpdaterJob')

# Engine version: Hourly jobs that update DR SavedClaims with delete_date
mgr.register('10 * * * *', 'DecisionReviews::HlrStatusUpdaterJob')
mgr.register('15 * * * *', 'DecisionReviews::NodStatusUpdaterJob')
mgr.register('40 * * * *', 'DecisionReviews::ScStatusUpdaterJob')

# Clean SavedClaim records that are past delete date
mgr.register('0 7 * * *', 'DecisionReview::DeleteSavedClaimRecordsJob')

# Engine version: Clean SavedClaim records that are past delete date
mgr.register('0 5 * * *', 'DecisionReviews::DeleteSavedClaimRecordsJob')

# Send Decision Review emails to Veteran for failed form/evidence submissions
mgr.register('5 1 * * *', 'DecisionReview::FailureNotificationEmailJob')

# Engine version: Send Decision Review emails to Veteran for failed form/evidence submissions
mgr.register('5 0 * * *', 'DecisionReviews::FailureNotificationEmailJob')

Expand Down
Loading