From be1e4ce05348e722e52c2e68f5b1c1514caa00dd Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 5 Feb 2018 16:11:03 +0100 Subject: schedule.rb: Abort old imports before import notification As a result of a new requirement, before doing the existing work we were doing in the imports cron job (notifying parent imports), we first need to clear out old imports and mark them as 'aborted'. Refs #4963 --- lib/tasks/imports.rake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/tasks/imports.rake b/lib/tasks/imports.rake index 6bc84acc8..fee850b23 100644 --- a/lib/tasks/imports.rake +++ b/lib/tasks/imports.rake @@ -3,4 +3,9 @@ namespace :import do task notify_parent: :environment do ParentImportNotifier.notify_when_finished end + + desc "Mark old unfinished imports as 'aborted'" + task abort_old: :environment do + Import.abort_old + end end -- cgit v1.2.3