Skip to content
Merged
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
3 changes: 2 additions & 1 deletion app/services/gpo_confirmation_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def run
clear_confirmations(confirmations)
rescue StandardError => error
NewRelic::Agent.notice_error(error)
raise error
end

private
Expand All @@ -32,7 +33,7 @@ def clear_confirmations(confirmations)
end

def remote_path
timestamp = @now.strftime('%Y%m%d')
timestamp = @now.strftime('%Y%m%d-%H%M%S')
File.join(IdentityConfig.store.usps_upload_sftp_directory, "batch#{timestamp}.psv")
end

Expand Down
3 changes: 2 additions & 1 deletion config/initializers/job_configurations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
cron_1h = '0 * * * *'
interval_1h = 60 * 60
cron_24h = '0 0 * * *'
gpo_cron_24h = '0 10 * * *' # 10am UTC is 5am EST/6am EDT
inteval_24h = 24 * 60 * 60

# Once we enable ruby workers in prod, we can remove all the JobRunner code and config
Expand All @@ -21,7 +22,7 @@
},
good_job: {
class: 'GpoDailyJob',
cron: cron_24h,
cron: gpo_cron_24h,
args: -> { [Time.zone.today] },
},
},
Expand Down
4 changes: 2 additions & 2 deletions spec/services/gpo_confirmation_uploader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

expect(NewRelic::Agent).to receive(:notice_error)

expect { subject }.to_not raise_error
expect { subject }.to raise_error

expect(GpoConfirmation.count).to eq 1
end
Expand All @@ -115,7 +115,7 @@ def sftp_options
end

def upload_folder
timestamp = Time.zone.now.strftime('%Y%m%d')
timestamp = Time.zone.now.strftime('%Y%m%d-%H%M%S')
File.join(IdentityConfig.store.usps_upload_sftp_directory, "batch#{timestamp}.psv")
end

Expand Down