queryName = $queryName; $this->whitelist = $whitelist; $this->age = max($age, StuckTaskRepository::MIN_AGE); $this->statuses = $statuses; /** * Simulating approach provided at common_persistence_sql_Platform::getNowExpression() * This is how we create new taskLogs in the system. * * @TODO Refactor this when we will have support for other Queue and TaskLog broker * * Task: https://oat-sa.atlassian.net/browse/ADF-556 */ $this->ageDateTime = new DateTimeImmutable( sprintf('now -%s seconds', $this->age), new DateTimeZone('UTC') ); } public function getQueryName(): string { return $this->queryName; } public function getWhitelist(): array { return $this->whitelist; } public function getStatuses(): array { return $this->statuses; } public function getAge() { return $this->age; } public function getAgeDateTime(): DateTimeImmutable { return $this->ageDateTime; } }