From 6e78192d99acc486a8607cf3c79e977b5d9800c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Gallego?= Date: Thu, 9 Jan 2014 14:35:05 +0100 Subject: [PATCH] Serialize content --- src/SlmQueue/Job/AbstractJob.php | 2 +- src/SlmQueue/Queue/AbstractQueue.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SlmQueue/Job/AbstractJob.php b/src/SlmQueue/Job/AbstractJob.php index 1581a8d..64000de 100644 --- a/src/SlmQueue/Job/AbstractJob.php +++ b/src/SlmQueue/Job/AbstractJob.php @@ -42,7 +42,7 @@ public function jsonSerialize() { $data = array( 'class' => get_called_class(), - 'content' => $this->getContent(), + 'content' => serialize($this->getContent()), 'metadata' => $this->getMetadata(), ); diff --git a/src/SlmQueue/Queue/AbstractQueue.php b/src/SlmQueue/Queue/AbstractQueue.php index 4f9db84..193ec17 100644 --- a/src/SlmQueue/Queue/AbstractQueue.php +++ b/src/SlmQueue/Queue/AbstractQueue.php @@ -57,7 +57,7 @@ public function createJob($className, $content = null, array $metadata = array() { /** @var $job \SlmQueue\Job\JobInterface */ $job = $this->jobPluginManager->get($className); - $job->setContent($content) + $job->setContent(unserialize($content)) ->setMetadata($metadata); return $job;