An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
refactor(CleanupRedis): optimize key retrieval in cleanupStuckJobs using Redis scan
Andras Bacsaib79aa1b195e3
diff --git a/app/Console/Commands/CleanupRedis.php b/app/Console/Commands/CleanupRedis.phpindex 64a3ac2591..93035e255d 100644--- a/app/Console/Commands/CleanupRedis.php+++ b/app/Console/Commands/CleanupRedis.php@@ -356,7 +356,13 @@ class CleanupRedis extends Command$now = time();// Get all keys with the horizon prefix- $keys = $redis->keys('*');+ $cursor = 0;+ $keys = [];+ do {+ $result = $redis->scan($cursor, ['MATCH' => '*', 'COUNT' => 100]);+ $cursor = $result[0];+ $keys = array_merge($keys, $result[1]);+ } while ($cursor !== 0);foreach ($keys as $key) {$keyWithoutPrefix = str_replace($prefix, '', $key);