1
0
Fork 0
forked from mirror/pixelfed

Update SharePipeline

This commit is contained in:
Daniel Supernault 2019-06-23 23:50:42 -06:00
parent 9d2b5c43ba
commit 8c860dc2ed
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -2,16 +2,13 @@
namespace App\Jobs\SharePipeline; namespace App\Jobs\SharePipeline;
use App\Status; use Cache, Log, Redis;
use App\Notification; use App\{Status, Notification};
use Cache;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
use Log;
use Redis;
class SharePipeline implements ShouldQueue class SharePipeline implements ShouldQueue
{ {
@ -74,8 +71,6 @@ class SharePipeline implements ShouldQueue
$notification->item_type = "App\Status"; $notification->item_type = "App\Status";
$notification->save(); $notification->save();
Cache::forever('notification.'.$notification->id, $notification);
$redis = Redis::connection(); $redis = Redis::connection();
$key = config('cache.prefix').':user.'.$status->profile_id.'.notifications'; $key = config('cache.prefix').':user.'.$status->profile_id.'.notifications';
$redis->lpush($key, $notification->id); $redis->lpush($key, $notification->id);