diff options
| author | Teddy Wing | 2018-02-05 16:11:03 +0100 |
|---|---|---|
| committer | Teddy Wing | 2018-02-06 10:50:51 +0100 |
| commit | be1e4ce05348e722e52c2e68f5b1c1514caa00dd (patch) | |
| tree | 55d69b2d76b9a47c1f7b06e7b821b705c90de08a /lib/tasks | |
| parent | 95536ec9ffe465cb591bab3c1e770264440a7c8a (diff) | |
| download | chouette-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.rake | 5 |
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 |
