aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tasks
diff options
context:
space:
mode:
authorTeddy Wing2018-02-05 16:11:03 +0100
committerTeddy Wing2018-02-06 10:50:51 +0100
commitbe1e4ce05348e722e52c2e68f5b1c1514caa00dd (patch)
tree55d69b2d76b9a47c1f7b06e7b821b705c90de08a /lib/tasks
parent95536ec9ffe465cb591bab3c1e770264440a7c8a (diff)
downloadchouette-core-be1e4ce05348e722e52c2e68f5b1c1514caa00dd.tar.bz2
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
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/imports.rake5
1 files changed, 5 insertions, 0 deletions
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