Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mfendeksilverstripe committed Jun 15, 2020
1 parent 86f79c7 commit 8b6754e
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions src/DataObjects/QueuedJobDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public function getCMSFields()
LiteralField::create(
'JobProgressReportIntro',
sprintf(
'<div><p>%3$0.2f%% completed</p><p><progress value="%1$d" max="%2$d">%3$0.2f%%</progress></p></div>',
'<p>%3$0.2f%% completed</p><p><progress value="%1$d" max="%2$d">%3$0.2f%%</progress></p>',
$this->StepsProcessed,
$this->TotalSteps,
$this->TotalSteps > 0 ? ($this->StepsProcessed / $this->TotalSteps) * 100 : 0
Expand All @@ -395,7 +395,11 @@ public function getCMSFields()
HeaderField::create('JobTimelineTitle', 'Timeline'),
LiteralField::create(
'JobTimelineIntro',
'<p>It is recommended to avoid editing these fields as they are managed by the Queue Runner / Service.</p>'
sprintf(
'<p>%s</p>',
'It is recommended to avoid editing these fields'
. ' as they are managed by the Queue Runner / Service.'
)
),
$jobStarted = DatetimeField::create('JobStarted', 'Started (initial)'),
$jobRestarted = DatetimeField::create('JobRestarted', 'Started (recent)'),
Expand All @@ -405,28 +409,37 @@ public function getCMSFields()
$jobFinished->setDescription('Job completion time.');
$jobRestarted->setDescription('Most recent attempt to run the job.');
$jobStarted->setDescription('First attempt to run the job.');
$jobTitle->setDescription('This field can be used to hold user comments about specific jobs (no functional impact).');
$jobType->setDescription('Type of Queue which the jobs belongs to.');
$status->setDescription('Represents current state within the job lifecycle.');

$jobTitle->setDescription(
'This field can be used to hold user comments about specific jobs (no functional impact).'
);

$startAfter->setDescription(
'Fill this out if you want to prevent the job from starting earlier than the specified time.'
. ' Note that this does not guarantee that the job will start exactly at the specified time (it can start later).'
. ' Note that this does not guarantee that the job will start'
. ' exactly at the specified time (it can start later).'
);

$runAs
->setTitle('Run With User')
->setDescription(
'Select a user you want to be used to run this job.'
. ' This should be used in case the changes done by this job have to look like the specified user made them.'
. ' This should be used in case the changes done by this job'
. ' have to look like the specified user made them.'
);

// Advanced
$fields->addFieldsToTab('Root.Advanced', [
HeaderField::create('AdvancedTabTitle', 'Advanced fields', 1),
LiteralField::create(
'AdvancedTabIntro',
'<p>It is recommended to avoid editing these fields as they are managed by the Queue Runner / Service.</p>'
sprintf(
'<p>%s</p>',
'It is recommended to avoid editing these fields'
. ' as they are managed by the Queue Runner / Service.'
)
),
$implementation = TextField::create('Implementation', 'Job Class'),
$signature = TextField::create('Signature', 'Job Signature'),
Expand Down Expand Up @@ -462,11 +475,14 @@ public function getCMSFields()
$notifiedBroken->setDescription('Indicates if a broken job notification was sent (this happens only once).');
$totalSteps->setDescription('Number of steps which is needed to complete this job.');
$stepsProcessed->setDescription('Number of steps processed so far.');
$worker->setDescription('Used by a worker (process) to claim this job which prevents any other process from claiming it.');
$workerCount->setDescription('Number of workers (processes) used to execute this job overall.');
$worker->setDescription(
'Used by a worker (process) to claim this job which prevents any other process from claiming it.'
);

$lastProcessCount->setDescription(
'Steps Processed value from previous execution of this job, used to compare against current state of the steps to determine the difference (progress).'
'Steps Processed value from previous execution of this job'
. ', used to compare against current state of the steps to determine the difference (progress).'
);

$signature->setDescription(
Expand Down

0 comments on commit 8b6754e

Please sign in to comment.