diff --git a/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php b/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php index 394c2cfb8..336ccecfc 100644 --- a/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php +++ b/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php @@ -201,7 +201,7 @@ class RemoteFollowImportRecent implements ShouldQueue Log::info(count($attachments).' media found...'); if ($count !== 0) { - NewStatusPipeline::dispatch($status, $status->media->first()); + NewStatusPipeline::dispatch($status); } } diff --git a/app/Observers/StatusHashtagObserver.php b/app/Observers/StatusHashtagObserver.php index cac223d51..75b611935 100644 --- a/app/Observers/StatusHashtagObserver.php +++ b/app/Observers/StatusHashtagObserver.php @@ -45,7 +45,7 @@ class StatusHashtagObserver implements ShouldHandleEventsAfterCommit */ public function deleted(StatusHashtag $hashtag) { - StatusHashtagService::del($hashtag->hashtag_id, $hashtag->status_id); + StatusHashtagService::del($hashtag->hashtag_id); DB::table('hashtags')->where('id', $hashtag->hashtag_id)->decrement('cached_count'); if($hashtag->status_visibility && $hashtag->status_visibility === 'public') { HashtagRemoveFanoutPipeline::dispatch($hashtag->status_id, $hashtag->hashtag_id)->onQueue('feed'); @@ -71,6 +71,6 @@ class StatusHashtagObserver implements ShouldHandleEventsAfterCommit */ public function forceDeleted(StatusHashtag $hashtag) { - StatusHashtagService::del($hashtag->hashtag_id, $hashtag->status_id); + StatusHashtagService::del($hashtag->hashtag_id); } } diff --git a/app/Services/StoryIndexService.php b/app/Services/StoryIndexService.php index 6be1aad9b..cb392452e 100644 --- a/app/Services/StoryIndexService.php +++ b/app/Services/StoryIndexService.php @@ -238,7 +238,10 @@ class StoryIndexService { $lockKey = $this->rebuildLockKey(); - $lockAcquired = Redis::set($lockKey, '1', 'EX', self::REBUILD_LOCK_TTL, 'NX'); + $lockAcquired = Redis::setnx($lockKey, '1'); + if ($lockAcquired) { + Redis::expire($lockKey, self::REBUILD_LOCK_TTL); + } if (! $lockAcquired) { return ['status' => 'already_rebuilding', 'message' => 'Index rebuild already in progress'];