Lines
n/a
0 / 0
Functions and Methods
n/a
0 / 0
Classes and Traits
n/a
0 / 0
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ResetGhostWorkstationCountByCron | n/a | 0 / 0 | n/a | 0 / 0 | 2 | n/a | 0 / 0 | |||
| init | n/a | 0 / 0 | n/a | 0 / 0 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | namespace BO\Zmsbackend\Helper; | |
| 4 | ||
| 5 | /** | |
| 6 | * @codeCoverageIgnore | |
| 7 | */ | |
| 8 | class ResetGhostWorkstationCountByCron | |
| 9 | { | |
| 10 | /** | |
| 11 | * reset ghostWorkstationCount by cron | |
| 12 | * | |
| 13 | * @return void | |
| 14 | */ | |
| 15 | ||
| 16 | public static function init() | |
| 17 | { | |
| 18 | $dateTime = new \DateTimeImmutable(); | |
| 19 | $query = new \BO\Zmsbackend\Scope\Service\Scope(); | |
| 20 | $scopeList = $query->readList(); | |
| 21 | foreach ($scopeList as $scope) { | |
| 22 | $scope->setStatusQueue('ghostWorkstationCount', '-1'); | |
| 23 | $query->updateGhostWorkstationCount($scope, $dateTime); | |
| 24 | } | |
| 25 | } | |
| 26 | } |