kopia lustrzana https://github.com/pixelfed/pixelfed
Fix PHPStan arguments.count issues
rodzic
cc90df9d8c
commit
b5c6984689
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue