فهرست منبع

Merge pull request #6143 from pixelfed/staging

Update StoryIndexService, improve redis compatability
(dan)iel (sup)ernault 3 هفته پیش
والد
کامیت
417e77878e
1فایلهای تغییر یافته به همراه1 افزوده شده و 3 حذف شده
  1. 1 3
      app/Services/StoryIndexService.php

+ 1 - 3
app/Services/StoryIndexService.php

@@ -238,9 +238,7 @@ class StoryIndexService
     {
         $lockKey = $this->rebuildLockKey();
 
-        $lockAcquired = config('database.redis.client') === 'predis'
-            ? Redis::set($lockKey, '1', 'EX', self::REBUILD_LOCK_TTL, 'NX')
-            : Redis::set($lockKey, '1', ['ex' => self::REBUILD_LOCK_TTL, 'nx' => true]);
+        $lockAcquired = Redis::set($lockKey, '1', 'EX', self::REBUILD_LOCK_TTL, 'NX');
 
         if (! $lockAcquired) {
             return ['status' => 'already_rebuilding', 'message' => 'Index rebuild already in progress'];