45 $this->lockFileHandles = array();
53 parent::onBeforeExecutingTestStartOperation();
54 $this->
requestLock(self::PROCESS_NAME_TEST_START_LOCK_CHECK);
62 $this->
releaseLock(self::PROCESS_NAME_TEST_START_LOCK_CHECK);
63 parent::onAfterExecutingTestStartOperation();
71 parent::onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables);
72 $this->
requestLock(self::PROCESS_NAME_RANDOM_PASS_BUILD);
80 $this->
releaseLock(self::PROCESS_NAME_RANDOM_PASS_BUILD);
81 parent::onAfterExecutingRandomPassBuildOperation($withTaxonomyTables);
89 parent::onBeforeExecutingTestStartOperation();
99 parent::onAfterExecutingTestStartOperation();
105 parent::onBeforeExecutingNamedOperation($operationDescriptor);
111 parent::onAfterExecutingNamedOperation($operationDescriptor);
117 $this->lockFileHandles[$processName] = fopen($lockFilePath,
'w');
118 flock($this->lockFileHandles[$processName], LOCK_EX);
123 $path = $this->lockFileStorage->getAbsolutePath();
124 return $path .
'/' . $processName .
'.lock';
129 flock($this->lockFileHandles[$processName], LOCK_UN);
130 fclose($this->lockFileHandles[$processName]);
onAfterExecutingTestFinishOperation()
{}
releaseLock($processName)
ilTestProcessLockFileStorage $lockFileStorage
onAfterExecutingRandomPassBuildOperation($withTaxonomyTables=false)
{}
onBeforeExecutingNamedOperation(string $operationDescriptor)
onBeforeExecutingTestStartOperation()
{}
onAfterExecutingNamedOperation(string $operationDescriptor)
onBeforeExecutingTestFinishOperation()
{}
const PROCESS_NAME_RANDOM_PASS_BUILD
const PROCESS_NAME_TEST_FINISH
__construct(ilTestProcessLockFileStorage $lockFileStorage)
ilTestProcessLockerFile constructor.
getLockFilePath($processName)
onAfterExecutingTestStartOperation()
{}
requestLock($processName)
onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables=false)
{}
const PROCESS_NAME_TEST_START_LOCK_CHECK