mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update AvatarOptimize job
This commit is contained in:
parent
541927634f
commit
acd705e9d3
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Jobs\AvatarPipeline;
|
namespace App\Jobs\AvatarPipeline;
|
||||||
|
|
||||||
|
use Cache;
|
||||||
use App\Avatar;
|
use App\Avatar;
|
||||||
use App\Profile;
|
use App\Profile;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
@ -61,6 +62,7 @@ class AvatarOptimize implements ShouldQueue
|
||||||
$avatar->change_count = ++$avatar->change_count;
|
$avatar->change_count = ++$avatar->change_count;
|
||||||
$avatar->last_processed_at = Carbon::now();
|
$avatar->last_processed_at = Carbon::now();
|
||||||
$avatar->save();
|
$avatar->save();
|
||||||
|
Cache::forget('avatar:' . $avatar->profile_id);
|
||||||
$this->deleteOldAvatar($avatar->media_path, $this->current);
|
$this->deleteOldAvatar($avatar->media_path, $this->current);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue