Skip to content

Commit

Permalink
Keep Full Job Environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Vítězslav Dvořák committed Dec 12, 2024
1 parent f022058 commit 4182fea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MultiFlexi/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public function newJob(int $runtemplateId, array $environment, \DateTime $schedu
'launched_by' => \Ease\Shared::user()->getMyKey(),
]);
$environment['MULTIFLEXI_JOB_ID']['value'] = $jobId;
$environment['MULTIFLEXI_JOB_ID']['source'] = 'Job';
$this->environment = $environment;
$this->updateToSQL(['env' => serialize($environment), 'command' => $this->getCmdline()], ['id' => $jobId]);

Expand Down Expand Up @@ -212,7 +213,7 @@ public function runBegin()
$this->reportToZabbix($this->zabbixMessageData);
}

$this->updateToSQL(['id' => $this->getMyKey(), 'command' => $this->executor->commandline(), 'runtemplate_id' => $this->runTemplate->getMyKey(), 'begin' => new \Envms\FluentPDO\Literal(\Ease\Shared::cfg('DB_CONNECTION') === 'sqlite' ? "date('now')" : 'NOW()')]);
$this->updateToSQL(['id' => $this->getMyKey(), 'env' => serialize($this->environment), 'command' => $this->executor->commandline(), 'runtemplate_id' => $this->runTemplate->getMyKey(), 'begin' => new \Envms\FluentPDO\Literal(\Ease\Shared::cfg('DB_CONNECTION') === 'sqlite' ? "date('now')" : 'NOW()')]);

return $jobId;
}
Expand Down

0 comments on commit 4182fea

Please sign in to comment.