X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=blobdiff_plain;f=includes%2Fjobqueue%2FJobQueueMemory.php;h=b26129ee91eafbec42fce81cb3822fa94cb11adc;hb=339a7c13003d8fcd8ccafd55559fc19cdaef3f11;hp=cbcd4fb28aed6625e306eeee263fb99d5cd2b69d;hpb=5f3f0e5c0deac62986e10803b47ab1e4c400ac32;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/JobQueueMemory.php b/includes/jobqueue/JobQueueMemory.php index cbcd4fb28a..b26129ee91 100644 --- a/includes/jobqueue/JobQueueMemory.php +++ b/includes/jobqueue/JobQueueMemory.php @@ -33,9 +33,9 @@ class JobQueueMemory extends JobQueue { protected static $data = []; public function __construct( array $params ) { - parent::__construct( $params ); + $params['wanCache'] = new WANObjectCache( [ 'cache' => new HashBagOStuff() ] ); - $this->dupCache = new HashBagOStuff(); + parent::__construct( $params ); } /** @@ -111,7 +111,7 @@ class JobQueueMemory extends JobQueue { /** * @see JobQueue::doPop * - * @return Job|bool + * @return RunnableJob|bool */ protected function doPop() { if ( $this->doGetSize() == 0 ) { @@ -143,9 +143,9 @@ class JobQueueMemory extends JobQueue { /** * @see JobQueue::doAck * - * @param Job $job + * @param RunnableJob $job */ - protected function doAck( Job $job ) { + protected function doAck( RunnableJob $job ) { if ( $this->getAcquiredCount() == 0 ) { return; } @@ -206,11 +206,10 @@ class JobQueueMemory extends JobQueue { /** * @param IJobSpecification $spec - * - * @return Job + * @return RunnableJob */ public function jobFromSpecInternal( IJobSpecification $spec ) { - return Job::factory( $spec->getType(), $spec->getTitle(), $spec->getParams() ); + return $this->factoryJob( $spec->getType(), $spec->getParams() ); } /**