BUG 9526 "Processes cannot be deleted when the memcache is..." SOLVED
- When memcache is enabled not refresh correctly the list of process (to create/delete an process) - Added method to delete key of the memcache to the create/delete an process
This commit is contained in:
@@ -191,6 +191,9 @@ class Process extends BaseProcess {
|
|||||||
$this->setProDescription ( 'Default Process Description' );
|
$this->setProDescription ( 'Default Process Description' );
|
||||||
|
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
|
$this->memcachedDelete();
|
||||||
|
|
||||||
return $this->getProUid();
|
return $this->getProUid();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -513,8 +516,11 @@ class Process extends BaseProcess {
|
|||||||
$oPro = ProcessPeer::retrieveByPK( $ProUid );
|
$oPro = ProcessPeer::retrieveByPK( $ProUid );
|
||||||
if (!is_null($oPro))
|
if (!is_null($oPro))
|
||||||
{
|
{
|
||||||
Content::removeContent('PRO_TITLE', '', $oPro->getProUid());
|
Content::removeContent('PRO_TITLE', '', $oPro->getProUid());
|
||||||
Content::removeContent('PRO_DESCRIPTION', '', $oPro->getProUid());
|
Content::removeContent('PRO_DESCRIPTION', '', $oPro->getProUid());
|
||||||
|
|
||||||
|
$this->memcachedDelete();
|
||||||
|
|
||||||
return $oPro->delete();
|
return $oPro->delete();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -751,7 +757,23 @@ class Process extends BaseProcess {
|
|||||||
return $aProc;
|
return $aProc;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Process
|
public function memcachedDelete()
|
||||||
|
{
|
||||||
|
//Limit defined in processmaker/workflow/engine/templates/processes/main.js
|
||||||
|
$limit = 25;
|
||||||
|
$start = 0;
|
||||||
|
|
||||||
|
$memcache = &PMmemcached::getSingleton(SYS_SYS);
|
||||||
|
|
||||||
|
for ($start = 0; $start <= 50 - 1; $start++) {
|
||||||
|
$memkey = "processList-allProcesses-" . ($start * $limit) . "-" . $limit;
|
||||||
|
$memkeyTotal = $memkey . "-total";
|
||||||
|
|
||||||
|
$r = $memcache->delete($memkey);
|
||||||
|
$r = $memcache->delete($memkeyTotal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} //Process
|
||||||
|
|
||||||
function ordProcessByProTitle($a, $b){
|
function ordProcessByProTitle($a, $b){
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user