mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Make sure that the SQL mutexes are specific to the current iTop instance, but still preserving the capability for the setup to detect an already running cron job with or without a valid config file.
SVN:trunk[3591]
This commit is contained in:
@@ -468,7 +468,7 @@ try
|
||||
// Prepare insert columns
|
||||
$sInsertColumns = '`'.implode('`, `', $aInputColumns).'`';
|
||||
|
||||
$oMutex = new iTopMutex('synchro_import_'.$oDataSource->GetKey().'_'.MetaModel::GetConfig()->GetDBName().'_'.MetaModel::GetConfig()->GetDBSubname());
|
||||
$oMutex = new iTopMutex('synchro_import_'.$oDataSource->GetKey());
|
||||
$oMutex->Lock();
|
||||
foreach($aData as $iRow => $aRow)
|
||||
{
|
||||
|
||||
@@ -2415,7 +2415,7 @@ class SynchroExecution
|
||||
|
||||
self::$m_oCurrentTask = $this->m_oDataSource;
|
||||
|
||||
$oMutex = new iTopMutex('synchro_process_'.$this->m_oDataSource->GetKey().'_'.MetaModel::GetConfig()->GetDBName().'_'.MetaModel::GetConfig()->GetDBSubname());
|
||||
$oMutex = new iTopMutex('synchro_process_'.$this->m_oDataSource->GetKey());
|
||||
try
|
||||
{
|
||||
$oMutex->Lock();
|
||||
|
||||
Reference in New Issue
Block a user