Browse Source

Adds logging for daily tasks (#2438)

* Adds logging for daily tasks.

* Fixes Code Climate issues in #2438.
closed-social-v3
Ash Furrow 7 years ago
committed by Eugen Rochko
parent
commit
d4f7f11c3c
1 changed files with 10 additions and 5 deletions
  1. +10
    -5
      lib/tasks/mastodon.rake

+ 10
- 5
lib/tasks/mastodon.rake View File

@ -3,11 +3,16 @@
namespace :mastodon do namespace :mastodon do
desc 'Execute daily tasks' desc 'Execute daily tasks'
task :daily do 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 end
desc 'Turn a user into an admin, identified by the USERNAME environment variable' desc 'Turn a user into an admin, identified by the USERNAME environment variable'

Loading…
Cancel
Save