Skip to content

Commit

Permalink
schedule resque restart cron; extend read timeout for sword job
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBlackLight committed Aug 7, 2024
1 parent 46528cb commit 1029e48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/jobs/sword_deposit_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def perform(deposit)

# Send request to SWORD
begin
response = HTTP.timeout(write: 60, connect: 60, read: 60)
response = HTTP.timeout(write: 60, connect: 60, read: 90)
.basic_auth(user: credentials['user'], pass: credentials['password'])
.headers(content_type: 'application/zip')
.post(credentials['url'], body: deposit.sword_zip)
Expand Down
5 changes: 5 additions & 0 deletions config/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@
every :weekday, at: '6pm' do
rake 'sitemap:create', email_subject: 'Sitemap generation'
end

# Restart resque workers daily.
every :day, at: '12am' do
rake 'resque:restart_workers', email_subject: 'Resque workers restart'
end

0 comments on commit 1029e48

Please sign in to comment.