Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • ExcelWriter
  • master
  • v0.3
  • 0.3.0
  • v0.1.0-beta
  • v0.1.1-beta
  • v0.1.2-beta
  • v0.1.3-beta
  • v0.1.4-beta
  • v0.2.0-beta
  • v0.2.1-beta
  • v0.2.2-beta
  • v0.2.3-beta
  • v0.3.0-alpha
  • v0.3.0-beta
  • v0.3.1
  • v0.3.10
  • v0.3.11
  • v0.3.12
  • v0.3.13
  • v0.3.14
  • v0.3.15
  • v0.3.16
  • v0.3.17
  • v0.3.18
  • v0.3.19
  • v0.3.2
  • v0.3.20
  • v0.3.3
  • v0.3.4
  • v0.3.5
  • v0.3.6
  • v0.3.7
  • v0.3.8
  • v0.3.9
  • v0.4.0
  • v0.4.1
  • v0.4.2
38 results

Target

Select target project
  • mtichy/nano-api
1 result
Select Git revision
  • ExcelWriter
  • master
  • v0.3
  • 0.3.0
  • v0.1.0-beta
  • v0.1.1-beta
  • v0.1.2-beta
  • v0.1.3-beta
  • v0.1.4-beta
  • v0.2.0-beta
  • v0.2.1-beta
  • v0.2.2-beta
  • v0.2.3-beta
  • v0.3.0-alpha
  • v0.3.0-beta
  • v0.3.1
  • v0.3.10
  • v0.3.11
  • v0.3.12
  • v0.3.13
  • v0.3.14
  • v0.3.15
  • v0.3.16
  • v0.3.17
  • v0.3.18
  • v0.3.19
  • v0.3.2
  • v0.3.20
  • v0.3.3
  • v0.3.4
  • v0.3.5
  • v0.3.6
  • v0.3.7
  • v0.3.8
  • v0.3.9
  • v0.4.0
  • v0.4.1
  • v0.4.2
38 results
Show changes
Commits on Source (1)
  • Michal Tichý's avatar
    Ensure the job locking dir · 6d7368d8
    Michal Tichý authored
    If it does not exist, Job will use standard system temp. It is a problem, if you run more than one instances at one system.
    6d7368d8
......@@ -6,8 +6,11 @@ use Cron\CronExpression;
use GO\Job;
use GO\Scheduler;
use Logger;
use MTi\Application\SystemMisconfiguredException;
use MTi\IDatetime;
use MTi\IEnv;
use Nette\IOException;
use Nette\Utils\FileSystem;
abstract class BaseJob
......@@ -52,7 +55,15 @@ abstract class BaseJob
$job = $this->_sched->php($this->_script, NULL, $params, $id);
$job->before([$this, 'before'])->then([$this, 'after'])->at($cron->getExpression());
if ($this->isLocking()) {
$job->onlyOne($this->env()->cacheDir() . '/scheduler');
$lockDir = $this->env()->cacheDir() . '/scheduler';
if (!is_dir($lockDir)) {
try {
FileSystem::createDir($lockDir);
} catch (IOException $e) {
throw new SystemMisconfiguredException('Cannot create job locking directory!');
}
}
$job->onlyOne($lockDir);
}
return $job;
}
......