Merge pull request #4284 from pixelfed/staging

Staging
This commit is contained in:
daniel 2023-04-08 18:32:17 -06:00 committed by GitHub
commit 8ac41196ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View file

@ -66,7 +66,13 @@ class MediaS3GarbageCollector extends Command
return; return;
} }
$minId = Media::orderByDesc('id')->where('created_at', '<', now()->subHours(12))->first()->id; $minId = Media::orderByDesc('id')->where('created_at', '<', now()->subHours(12))->first();
if(!$minId) {
return;
} else {
$minId = $minId->id;
}
return $hugeMode ? return $hugeMode ?
$this->hugeMode($minId, $limit, $log) : $this->hugeMode($minId, $limit, $log) :

View file

@ -219,11 +219,11 @@ class StatusController extends Controller
$u->save(); $u->save();
} }
if ($status->profile_id == $user->profile->id || $user->is_admin == true) {
Cache::forget('_api:statuses:recent_9:' . $status->profile_id); Cache::forget('_api:statuses:recent_9:' . $status->profile_id);
Cache::forget('profile:status_count:' . $status->profile_id); Cache::forget('profile:status_count:' . $status->profile_id);
Cache::forget('profile:embed:' . $status->profile_id); Cache::forget('profile:embed:' . $status->profile_id);
StatusService::del($status->id, true); StatusService::del($status->id, true);
if ($status->profile_id == $user->profile->id || $user->is_admin == true) {
Cache::forget('profile:status_count:'.$status->profile_id); Cache::forget('profile:status_count:'.$status->profile_id);
StatusDelete::dispatch($status); StatusDelete::dispatch($status);
} }