Update AvatarOptimize job

This commit is contained in:
Daniel Supernault 2019-04-06 16:45:32 -06:00
parent 541927634f
commit acd705e9d3
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -2,6 +2,7 @@
namespace App\Jobs\AvatarPipeline;
use Cache;
use App\Avatar;
use App\Profile;
use Carbon\Carbon;
@ -61,6 +62,7 @@ class AvatarOptimize implements ShouldQueue
$avatar->change_count = ++$avatar->change_count;
$avatar->last_processed_at = Carbon::now();
$avatar->save();
Cache::forget('avatar:' . $avatar->profile_id);
$this->deleteOldAvatar($avatar->media_path, $this->current);
} catch (Exception $e) {
}