Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
implement fix for issue EZP-23206 in the tracer version of the publis…
Browse files Browse the repository at this point in the history
…hingqueue processor
  • Loading branch information
gggeek committed Sep 17, 2014
1 parent 5844fd5 commit f2c0628
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 16 additions & 1 deletion classes/ezperfloggercontentpublishingqueue.php
Expand Up @@ -29,7 +29,9 @@ protected final static function initExtraHooks()
}

/**
* Reimplemented, so that we give back a different type of item to the queue processor
* Reimplemented, so that
* - we give back a different type of item to the queue processor
* - we only allow 1 concurrent publication per-object at a time
*/
public static function next()
{
Expand All @@ -43,6 +45,19 @@ public static function next()
if ( count( $queuedProcess ) == 0 )
return false;
else
{
// check if another instance is being published of the same object
$db = eZDB::instance();
$processing = $db->arrayQuery( "SELECT count(*) AS other" .
"FROM ezpublishingqueueprocesses p, ezcontentobject_version v " .
"WHERE p.ezcontentobject_version_id = v.id AND p.status = 1 AND v.contentobject_id IN ( " .
"SELECT contentobject_id FROM ezcontentobject_version v2 WHERE id = " . $queuedProcess[0]->attribute('ezcontentobject_version_id') . " )"
);
if ( $processing[0]['other'] )
{
return false;
}
return $queuedProcess[0];
}
}
}
2 changes: 2 additions & 0 deletions doc/changelogs/changelog-0.11.1-to-0.12
Expand Up @@ -15,4 +15,6 @@ changelog from version 0.11 to 0.12 - released 2014.9.xx

- Minor fix in the tracer for imagemagick conversion for eZP 4.6 to 5.1 (was referencing a class from the 4.5 tracers)

- implement fix for issue EZP-23206 in the tracer version of the publishingqueue processor

* Changes

0 comments on commit f2c0628

Please sign in to comment.