Logo
Explore Support Help
Register Sign In
tykayn/mastodon
1
0
Fork 0
You've already forked mastodon
mirror of https://framagit.org/tykayn/mastodon.git synced 2023-08-25 08:33:12 +02:00
Code Issues Projects Releases Wiki Activity
mastodon/app/workers/removal_worker.rb

12 lines
272 B
Ruby
Raw Normal View History

Delete statuses asynchronously but provide instant feedback in the API
2016-11-29 15:32:25 +01:00
# frozen_string_literal: true
class RemovalWorker
include Sidekiq::Worker
Fix remote and staff-removed statuses leaving media behind for a day (#11638) The reason for unattaching media instead of removing it is to support delete & redraft functionality, but remote or staff-removed statuses will never be redrafted, so the media should be deleted immediately
2019-08-22 04:17:12 +02:00
def perform(status_id, options = {})
Add soft delete for statuses for instant deletes through API (#11623) * Add soft delete for statuses to allow them to appear instant * Allow reporting soft-deleted statuses and show them in the admin UI * Change index for getting an account's statuses
2019-08-22 21:55:56 +02:00
RemoveStatusService.new.call(Status.with_discarded.find(status_id), **options.symbolize_keys)
Adding some rescues to workers, e.g. don't fail removal job when status can't be found in the first place (already removed)
2016-12-19 09:31:12 +01:00
rescue ActiveRecord::RecordNotFound
true
Delete statuses asynchronously but provide instant feedback in the API
2016-11-29 15:32:25 +01:00
end
Thread resolving no longer needs to be separate from ProcessFeedService, since that is only ever called in the background
2016-12-11 22:23:11 +01:00
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.1 Page: 130ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API Help
Logo Chapril
Accueil Chapril
Services libres
Nous suivre
CGU
Mentions légales
Nous contacter
Accueil Chapril
Services libres
Nous suivre
CGU
Mentions légales
Nous contacter