aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/schedule.rb4
-rw-r--r--lib/tasks/imports.rake6
2 files changed, 10 insertions, 0 deletions
diff --git a/config/schedule.rb b/config/schedule.rb
index 83c4d7388..8aa21076f 100644
--- a/config/schedule.rb
+++ b/config/schedule.rb
@@ -38,3 +38,7 @@ end
every :day, :at => '4:00 am' do
rake "codifligne:sync"
end
+
+every 5.minutes do
+ rake "import:notify_parent"
+end
diff --git a/lib/tasks/imports.rake b/lib/tasks/imports.rake
new file mode 100644
index 000000000..6bc84acc8
--- /dev/null
+++ b/lib/tasks/imports.rake
@@ -0,0 +1,6 @@
+namespace :import do
+ desc "Notify parent imports when children finish"
+ task notify_parent: :environment do
+ ParentImportNotifier.notify_when_finished
+ end
+end