Skip to content

Commit

Permalink
Adds logging for daily tasks (mastodon#2438)
Browse files Browse the repository at this point in the history
* Adds logging for daily tasks.

* Fixes Code Climate issues in mastodon#2438.
  • Loading branch information
ashfurrow authored and Gargron committed Apr 25, 2017
1 parent 1ce951d commit d4f7f11
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/tasks/mastodon.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit d4f7f11

Please sign in to comment.