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
feat(CleanupRedis): add error handling for JSON decode failures in cleanupStuckJobs method
Andras Bacsaia95e92f098ad
diff --git a/app/Console/Commands/CleanupRedis.php b/app/Console/Commands/CleanupRedis.phpindex 8158950647..64a3ac2591 100644--- a/app/Console/Commands/CleanupRedis.php+++ b/app/Console/Commands/CleanupRedis.php@@ -388,6 +388,15 @@ class CleanupRedis extends Commandcontinue;}+ // Check for JSON decode errors+ if ($payloadData === null || json_last_error() !== JSON_ERROR_NONE) {+ $errorMsg = json_last_error_msg();+ $truncatedPayload = is_string($payload) ? substr($payload, 0, 200) : 'non-string payload';+ $this->error("Failed to decode job payload for {$keyWithoutPrefix}: {$errorMsg}. Payload: {$truncatedPayload}");++ continue;+ }+$jobClass = data_get($payloadData, 'displayName', 'Unknown');// Prefer reserved_at (when job started processing), fallback to created_at