Adds logging for daily tasks (#2438)

* Adds logging for daily tasks.

* Fixes Code Climate issues in #2438.
This commit is contained in:
Ash Furrow 2017-04-25 16:44:48 +02:00 committed by Eugen Rochko
parent 1ce951d0be
commit d4f7f11c3c

View file

@ -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'