From a43228cbf2fd6e99a6ddcc52689ea559a3124c59 Mon Sep 17 00:00:00 2001 From: Florent Peyraud Date: Tue, 2 Jan 2018 18:50:33 +0100 Subject: cron PATH envvar and heartbeat --- config/schedule.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config/schedule.rb') diff --git a/config/schedule.rb b/config/schedule.rb index 8aa21076f..08488c255 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -42,3 +42,7 @@ end every 5.minutes do rake "import:notify_parent" end + +every 1.minute do + command "/bin/echo HeartBeat" +end -- cgit v1.2.3 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 --- config/schedule.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config/schedule.rb') diff --git a/config/schedule.rb b/config/schedule.rb index 08488c255..636ab654e 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -40,6 +40,7 @@ every :day, :at => '4:00 am' do end every 5.minutes do + rake "import:abort_old" rake "import:notify_parent" end -- cgit v1.2.3 From 2e346505cbf2f82c5aaf6fca37966a39b6c9656c Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 5 Feb 2018 16:54:01 +0100 Subject: imports.rake: Change `abort_old` to `netex_abort_old` After re-reading the ticket, I see now that the aborting of old imports should only apply to `NetexImport`s. Update the code to make this happen. Refs #4963 --- config/schedule.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/schedule.rb') diff --git a/config/schedule.rb b/config/schedule.rb index 636ab654e..40ee8e4ac 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -40,7 +40,7 @@ every :day, :at => '4:00 am' do end every 5.minutes do - rake "import:abort_old" + rake "import:netex_abort_old" rake "import:notify_parent" end -- cgit v1.2.3 From f6bc7ad342c19393d364341b3e753154df78a295 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 7 Feb 2018 13:01:01 +0100 Subject: schedule.rb: Add cron job to finalise `ComplianceCheckSet`s A new recurring job that does exactly the same thing as the import job. This finalises `ComplianceCheckSet`s. First we need to abort all unfinished `ComplianceCheckSet`s older than four hours. Then we finalise the imports by doing the same work in `Api::V1::Internals::ComplianceCheckSetsController#notify_parent`, namely calling `#notify_parent` on `ComplianceCheckSet`s (here, only on the ones that are finished). Add a couple new Rake tasks for compliance check sets that mirror those for imports, and do the work required by the cron job. Refs #4758 --- config/schedule.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config/schedule.rb') diff --git a/config/schedule.rb b/config/schedule.rb index 08488c255..532707470 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -43,6 +43,11 @@ every 5.minutes do rake "import:notify_parent" end +every 5.minutes do + rake "compliance_check_sets:abort_old" + rake "compliance_check_sets:notify_parent" +end + every 1.minute do command "/bin/echo HeartBeat" end -- cgit v1.2.3