mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-10 06:00:45 +00:00
Update CatchUnoptimizedMedia command, make 1hr limit opt-in
This commit is contained in:
parent
6f7e37b3f0
commit
99b15b73f6
2 changed files with 8 additions and 3 deletions
|
@ -40,10 +40,11 @@ class CatchUnoptimizedMedia extends Command
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
$hasLimit = (bool) config('media.image_optimize.catch_unoptimized_media_hour_limit');
|
||||||
Media::whereNull('processed_at')
|
Media::whereNull('processed_at')
|
||||||
// This is commented out because Instagram imported posts would not get uploaded to remote storage
|
->when($hasLimit, function($q, $hasLimit) {
|
||||||
// ->where('created_at', '>', now()->subHours(1))
|
$q->where('created_at', '>', now()->subHours(1));
|
||||||
->whereNull('remote_url')
|
})->whereNull('remote_url')
|
||||||
->whereNotNull('status_id')
|
->whereNotNull('status_id')
|
||||||
->whereNotNull('media_path')
|
->whereNotNull('media_path')
|
||||||
->whereIn('mime', [
|
->whereIn('mime', [
|
||||||
|
|
|
@ -24,6 +24,10 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'image_optimize' => [
|
||||||
|
'catch_unoptimized_media_hour_limit' => env('PF_CATCHUNOPTIMIZEDMEDIA', false),
|
||||||
|
],
|
||||||
|
|
||||||
'hls' => [
|
'hls' => [
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue