From e60a477fdb628dab7eea185a23b7d80a2e488daf Mon Sep 17 00:00:00 2001 From: Richard K Miller Date: Tue, 12 Mar 2013 16:53:23 -0600 Subject: [PATCH 1/3] Set job timestamp to ISO 8601 format so it can be properly 'relatized' by Resque-web --- lib/Resque/Worker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Resque/Worker.php b/lib/Resque/Worker.php index 45852bb..656ddd6 100644 --- a/lib/Resque/Worker.php +++ b/lib/Resque/Worker.php @@ -486,7 +486,7 @@ public function workingOn(Resque_Job $job) $job->updateStatus(Resque_Job_Status::STATUS_RUNNING); $data = json_encode(array( 'queue' => $job->queue, - 'run_at' => strftime('%a %b %d %H:%M:%S %Z %Y'), + 'run_at' => date('c'), 'payload' => $job->payload )); Resque::redis()->set('worker:' . $job->worker, $data); From b42d8a183470438552e989d306df1e95e61ee464 Mon Sep 17 00:00:00 2001 From: Richard K Miller Date: Wed, 27 Mar 2013 08:32:43 -0600 Subject: [PATCH 2/3] update the timestamp format in another location --- lib/Resque/Failure/Redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Resque/Failure/Redis.php b/lib/Resque/Failure/Redis.php index cfac5b6..84cdec4 100644 --- a/lib/Resque/Failure/Redis.php +++ b/lib/Resque/Failure/Redis.php @@ -20,7 +20,7 @@ class Resque_Failure_Redis implements Resque_Failure_Interface public function __construct($payload, $exception, $worker, $queue) { $data = new stdClass; - $data->failed_at = strftime('%a %b %d %H:%M:%S %Z %Y'); + $data->failed_at = date('c'); $data->payload = $payload; $data->exception = get_class($exception); $data->error = $exception->getMessage(); From f1ccf60e4d2f7f9aa613783592b38fc3b15d2922 Mon Sep 17 00:00:00 2001 From: Richard K Miller Date: Wed, 27 Mar 2013 08:32:52 -0600 Subject: [PATCH 3/3] update the timestamp format in another location --- lib/Resque/Worker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Resque/Worker.php b/lib/Resque/Worker.php index 656ddd6..0ffe79c 100644 --- a/lib/Resque/Worker.php +++ b/lib/Resque/Worker.php @@ -454,7 +454,7 @@ public function workerPids() public function registerWorker() { Resque::redis()->sadd('workers', (string)$this); - Resque::redis()->set('worker:' . (string)$this . ':started', strftime('%a %b %d %H:%M:%S %Z %Y')); + Resque::redis()->set('worker:' . (string)$this . ':started', date('c')); } /**