ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\BackgroundTasks\Task\Job\JobEntity Class Reference
+ Collaboration diagram for ILIAS\BackgroundTasks\Task\Job\JobEntity:

Public Member Functions

 __construct (private readonly \ILIAS\Cron\CronJob $job, array $record, private readonly bool $isPlugin=false)
 
 getJob ()
 
 getJobId ()
 
 getEffectiveJobId ()
 
 getComponent ()
 
 getScheduleType ()
 
 getScheduleValue ()
 
 getJobStatus ()
 
 getJobStatusUsrId ()
 
 getJobStatusType ()
 
 getJobStatusTimestamp ()
 
 getJobResultStatus ()
 
 getJobResultUsrId ()
 
 getJobResultCode ()
 
 getJobResultMessage ()
 
 getJobResultType ()
 
 getJobResultTimestamp ()
 
 getClass ()
 
 getPath ()
 
 getRunningTimestamp ()
 
 getJobResultDuration ()
 
 getAliveTimestamp ()
 
 isPlugin ()
 
 getEffectiveScheduleType ()
 
 getEffectiveScheduleValue ()
 
 getEffectiveTitle ()
 

Private Member Functions

 mapRecord (array $record)
 

Private Attributes

string $job_id
 
string $component
 
JobScheduleType $schedule_type
 
int $schedule_value
 
int $job_status
 
int $job_status_usr_id
 
int $job_status_type
 
int $job_status_timestamp
 
int $job_result_status
 
int $job_result_usr_id
 
string $job_result_code
 
string $job_result_message
 
int $job_result_type
 
int $job_result_timestamp
 
string $class
 
string $path
 
int $running_timestamp
 
int $job_result_duration
 
int $alive_timestamp
 

Detailed Description

Definition at line 25 of file JobEntity.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\BackgroundTasks\Task\Job\JobEntity::__construct ( private readonly \ILIAS\Cron\CronJob  $job,
array  $record,
private readonly bool  $isPlugin = false 
)
Parameters
array<string,mixed>$record

Definition at line 50 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\mapRecord().

54  {
55  $this->mapRecord($record);
56  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getAliveTimestamp()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getAliveTimestamp ( )

Definition at line 191 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$alive_timestamp.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatLastRun().

191  : int
192  {
193  return $this->alive_timestamp;
194  }
+ Here is the caller graph for this function:

◆ getClass()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getClass ( )

Definition at line 171 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$class.

171  : string
172  {
173  return $this->class;
174  }

◆ getComponent()

◆ getEffectiveJobId()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getEffectiveJobId ( )

◆ getEffectiveScheduleType()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getEffectiveScheduleType ( )

Definition at line 201 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\getJob(), and ILIAS\BackgroundTasks\Task\Job\JobEntity\getScheduleType().

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTableFilterMediator\filteredJobs(), and ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatSchedule().

202  {
203  $type = $this->getScheduleType();
204  if (!$type || !$this->getJob()->hasFlexibleSchedule()) {
205  $type = $this->getJob()->getDefaultScheduleType();
206  }
207 
208  return $type;
209  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEffectiveScheduleValue()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getEffectiveScheduleValue ( )

Definition at line 211 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\getJob(), ILIAS\BackgroundTasks\Task\Job\JobEntity\getScheduleType(), ILIAS\BackgroundTasks\Task\Job\JobEntity\getScheduleValue(), and ILIAS\Repository\int().

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatSchedule().

211  : int
212  {
213  $type = $this->getScheduleType();
214  $value = $this->getScheduleValue();
215  if (!$type || !$this->getJob()->hasFlexibleSchedule()) {
216  $value = (int) $this->getJob()->getDefaultScheduleValue();
217  }
218 
219  return $value;
220  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEffectiveTitle()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getEffectiveTitle ( )

Definition at line 222 of file JobEntity.php.

References $id, ILIAS\BackgroundTasks\Task\Job\JobEntity\getComponent(), ILIAS\BackgroundTasks\Task\Job\JobEntity\getJob(), ILIAS\BackgroundTasks\Task\Job\JobEntity\getJobId(), and ILIAS\BackgroundTasks\Task\Job\JobEntity\isPlugin().

Referenced by ilCronManagerGUI\addProblematicItemsInfo(), ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTableFilterMediator\filteredJobs(), and ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatTitle().

222  : string
223  {
224  $id = $this->getJobId();
225  if ($this->isPlugin()) {
226  $id = 'pl__' . $this->getComponent() . '__' . $id;
227  }
228 
229  $title = $this->getJob()->getTitle();
230  if ($title === '') {
231  $title = $id;
232  }
233 
234  return $title;
235  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getJob()

◆ getJobId()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobId ( )

◆ getJobResultCode()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobResultCode ( )

Definition at line 151 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$job_result_code.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatResultInfo().

151  : string
152  {
153  return $this->job_result_code;
154  }
+ Here is the caller graph for this function:

◆ getJobResultDuration()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobResultDuration ( )

Definition at line 186 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$job_result_duration.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatResultInfo().

186  : int
187  {
189  }
+ Here is the caller graph for this function:

◆ getJobResultMessage()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobResultMessage ( )

Definition at line 156 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$job_result_message.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatResultInfo().

156  : string
157  {
159  }
+ Here is the caller graph for this function:

◆ getJobResultStatus()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobResultStatus ( )

◆ getJobResultTimestamp()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobResultTimestamp ( )

◆ getJobResultType()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobResultType ( )

Definition at line 161 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$job_result_type.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatResultInfo().

161  : int
162  {
163  return $this->job_result_type;
164  }
+ Here is the caller graph for this function:

◆ getJobResultUsrId()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobResultUsrId ( )

Definition at line 146 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$job_result_usr_id.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatResultInfo().

146  : int
147  {
149  }
+ Here is the caller graph for this function:

◆ getJobStatus()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobStatus ( )

Definition at line 121 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$job_status.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTableFilterMediator\filteredJobs().

121  : int
122  {
123  return $this->job_status;
124  }
+ Here is the caller graph for this function:

◆ getJobStatusTimestamp()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobStatusTimestamp ( )

Definition at line 136 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$job_status_timestamp.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatStatusInfo().

136  : int
137  {
139  }
+ Here is the caller graph for this function:

◆ getJobStatusType()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobStatusType ( )

Definition at line 131 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$job_status_type.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatStatusInfo().

131  : int
132  {
133  return $this->job_status_type;
134  }
+ Here is the caller graph for this function:

◆ getJobStatusUsrId()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getJobStatusUsrId ( )

Definition at line 126 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$job_status_usr_id.

Referenced by ILIAS\BackgroundTasks\Task\Job\Manager\UI\JobTable\formatStatusInfo().

126  : int
127  {
129  }
+ Here is the caller graph for this function:

◆ getPath()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getPath ( )

Definition at line 176 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$path.

176  : string
177  {
178  return $this->path;
179  }

◆ getRunningTimestamp()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getRunningTimestamp ( )

◆ getScheduleType()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getScheduleType ( )

◆ getScheduleValue()

ILIAS\BackgroundTasks\Task\Job\JobEntity::getScheduleValue ( )

Definition at line 116 of file JobEntity.php.

References ILIAS\BackgroundTasks\Task\Job\JobEntity\$schedule_value.

Referenced by ILIAS\BackgroundTasks\Task\Job\JobEntity\getEffectiveScheduleValue().

116  : int
117  {
118  return $this->schedule_value;
119  }
+ Here is the caller graph for this function:

◆ isPlugin()

◆ mapRecord()

ILIAS\BackgroundTasks\Task\Job\JobEntity::mapRecord ( array  $record)
private
Parameters
array<string,mixed>$record

Definition at line 61 of file JobEntity.php.

References ILIAS\Repository\int(), and null.

Referenced by ILIAS\BackgroundTasks\Task\Job\JobEntity\__construct().

61  : void
62  {
63  $this->job_id = (string) $record['job_id'];
64  $this->component = (string) $record['component'];
65  $this->schedule_type = is_numeric($record['schedule_type']) ? JobScheduleType::tryFrom(
66  (int) $record['schedule_type']
67  ) : null;
68  $this->schedule_value = (int) $record['schedule_value'];
69  $this->job_status = (int) $record['job_status'];
70  $this->job_status_usr_id = (int) $record['job_status_user_id'];
71  $this->job_status_type = (int) $record['job_status_type'];
72  $this->job_status_timestamp = (int) $record['job_status_ts'];
73  $this->job_result_status = (int) $record['job_result_status'];
74  $this->job_result_usr_id = (int) $record['job_result_user_id'];
75  $this->job_result_code = (string) $record['job_result_code'];
76  $this->job_result_message = (string) $record['job_result_message'];
77  $this->job_result_type = (int) $record['job_result_type'];
78  $this->job_result_timestamp = (int) $record['job_result_ts'];
79  $this->class = (string) $record['class'];
80  $this->path = (string) $record['path'];
81  $this->running_timestamp = (int) $record['running_ts'];
82  $this->job_result_duration = (int) $record['job_result_dur'];
83  $this->alive_timestamp = (int) $record['alive_ts'];
84  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $alive_timestamp

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$alive_timestamp
private

◆ $class

string ILIAS\BackgroundTasks\Task\Job\JobEntity::$class
private

Definition at line 41 of file JobEntity.php.

Referenced by ILIAS\BackgroundTasks\Task\Job\JobEntity\getClass().

◆ $component

string ILIAS\BackgroundTasks\Task\Job\JobEntity::$component
private

Definition at line 28 of file JobEntity.php.

Referenced by ILIAS\BackgroundTasks\Task\Job\JobEntity\getComponent().

◆ $job_id

string ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_id
private

◆ $job_result_code

string ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_result_code
private

◆ $job_result_duration

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_result_duration
private

◆ $job_result_message

string ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_result_message
private

◆ $job_result_status

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_result_status
private

◆ $job_result_timestamp

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_result_timestamp
private

◆ $job_result_type

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_result_type
private

◆ $job_result_usr_id

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_result_usr_id
private

◆ $job_status

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_status
private

Definition at line 31 of file JobEntity.php.

Referenced by ILIAS\BackgroundTasks\Task\Job\JobEntity\getJobStatus().

◆ $job_status_timestamp

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_status_timestamp
private

◆ $job_status_type

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_status_type
private

◆ $job_status_usr_id

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$job_status_usr_id
private

◆ $path

string ILIAS\BackgroundTasks\Task\Job\JobEntity::$path
private

Definition at line 42 of file JobEntity.php.

Referenced by ILIAS\BackgroundTasks\Task\Job\JobEntity\getPath().

◆ $running_timestamp

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$running_timestamp
private

◆ $schedule_type

JobScheduleType ILIAS\BackgroundTasks\Task\Job\JobEntity::$schedule_type
private

◆ $schedule_value

int ILIAS\BackgroundTasks\Task\Job\JobEntity::$schedule_value
private

The documentation for this class was generated from the following file: