about summary refs log tree commit diff
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/glitchsoc.rake8
-rw-r--r--lib/tasks/mastodon.rake7
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/tasks/glitchsoc.rake b/lib/tasks/glitchsoc.rake
new file mode 100644
index 000000000..79e864648
--- /dev/null
+++ b/lib/tasks/glitchsoc.rake
@@ -0,0 +1,8 @@
+namespace :glitchsoc do
+  desc 'Backfill local-only flag on statuses table'
+  task backfill_local_only: :environment do
+    Status.local.where(local_only: nil).find_each do |st|
+      ActiveRecord::Base.logger.silence { st.update_attribute(:local_only, st.marked_local_only?) }
+    end
+  end
+end
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake
index 33969d470..38dbed982 100644
--- a/lib/tasks/mastodon.rake
+++ b/lib/tasks/mastodon.rake
@@ -171,11 +171,10 @@ namespace :mastodon do
   end
 
   namespace :emails do
-    desc 'Send out digest e-mails'
+    desc 'Send out digest e-mails (deprecated)'
     task digest: :environment do
-      User.confirmed.joins(:account).where(accounts: { silenced: false, suspended: false }).where('current_sign_in_at < ?', 20.days.ago).find_each do |user|
-        DigestMailerWorker.perform_async(user.id)
-      end
+      # No-op
+      # This task is now executed via sidekiq-scheduler
     end
   end