about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorAsh Furrow <ash@ashfurrow.com>2017-04-25 16:44:48 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-04-25 16:44:48 +0200
commitd4f7f11c3c8f4c117394feccca9bbe537f59524d (patch)
tree867430fb9f0037738c054671a4997bac7c5162da /lib
parent1ce951d0be68bce4f0f61bff5f978fa5e1cd34a1 (diff)
Adds logging for daily tasks (#2438)
* Adds logging for daily tasks.

* Fixes Code Climate issues in #2438.
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/mastodon.rake15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake
index 7dd7b5cd1..df8ceb36f 100644
--- a/lib/tasks/mastodon.rake
+++ b/lib/tasks/mastodon.rake
@@ -3,11 +3,16 @@
 namespace :mastodon do
   desc 'Execute daily tasks'
   task :daily do
-    Rake::Task['mastodon:feeds:clear'].invoke
-    Rake::Task['mastodon:media:clear'].invoke
-    Rake::Task['mastodon:users:clear'].invoke
-
-    Rake::Task['mastodon:push:refresh'].invoke
+    %w(
+      mastodon:feeds:clear
+      mastodon:media:clear
+      mastodon:users:clear
+      mastodon:push:refresh
+    ).each do |task|
+      puts "Starting #{task} at #{Time.utc.now}"
+      Rake::Task[task].invoke
+    end
+    puts "Completed daily tasks at #{Time.utc.now}"
   end
 
   desc 'Turn a user into an admin, identified by the USERNAME environment variable'