aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cron.rb
diff options
context:
space:
mode:
authorcedricnjanga2018-05-28 05:53:05 -0700
committerJohan Van Ryseghem2018-05-28 16:20:55 +0200
commit9df209e05344c30cfa126522adaffa4c7ad463bd (patch)
tree3b762cc48d8c9b5de67038fb8b55760b5954e58e /lib/cron.rb
parent3f7c4b11e27fba2abba6e5bfa676f41b886896e5 (diff)
downloadchouette-core-9df209e05344c30cfa126522adaffa4c7ad463bd.tar.bz2
Refs #6962 Fix wrong syntac in schedule file & remove unnecessary rake files
Diffstat (limited to 'lib/cron.rb')
-rw-r--r--lib/cron.rb24
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/cron.rb b/lib/cron.rb
index 7e2ca4cdf..fe010ffd9 100644
--- a/lib/cron.rb
+++ b/lib/cron.rb
@@ -1,6 +1,26 @@
module Cron
class << self
+ def every_day_at_3AM
+ sync_reflex
+ end
+
+ def every_day_at_4AM
+ sync_codifligne
+ end
+
+ def every_hour
+ sync_organizations
+ sync_users
+ end
+
+ def every_5_minutes
+ check_import_operations
+ check_ccset_operations
+ end
+
+ private
+
def sync_organizations
begin
Organisation.portail_sync
@@ -37,7 +57,7 @@ module Cron
end
end
- def check_import_operations
+ def check_ccset_operations
begin
ParentNotifier.new(ComplianceCheckSet).notify_when_finished
ComplianceCheckSet.abort_old
@@ -46,7 +66,7 @@ module Cron
end
end
- def check_ccset_operations
+ def check_import_operations
begin
ParentNotifier.new(Import::Base).notify_when_finished
Import::Netex.abort_old