diff --git a/app/jobs/sword_deposit_job.rb b/app/jobs/sword_deposit_job.rb index 0114eda1..295207cf 100644 --- a/app/jobs/sword_deposit_job.rb +++ b/app/jobs/sword_deposit_job.rb @@ -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) diff --git a/config/schedule.rb b/config/schedule.rb index e310c6f9..933c2e41 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -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