From 8b6754eca9b8f907447588e281ecfb8f87344a51 Mon Sep 17 00:00:00 2001 From: Mojmir Fendek Date: Mon, 15 Jun 2020 14:29:31 +1200 Subject: [PATCH] Fixes --- src/DataObjects/QueuedJobDescriptor.php | 32 ++++++++++++++++++------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/DataObjects/QueuedJobDescriptor.php b/src/DataObjects/QueuedJobDescriptor.php index 24907372..c8ef7679 100644 --- a/src/DataObjects/QueuedJobDescriptor.php +++ b/src/DataObjects/QueuedJobDescriptor.php @@ -381,7 +381,7 @@ public function getCMSFields() LiteralField::create( 'JobProgressReportIntro', sprintf( - '

%3$0.2f%% completed

%3$0.2f%%

', + '

%3$0.2f%% completed

%3$0.2f%%

', $this->StepsProcessed, $this->TotalSteps, $this->TotalSteps > 0 ? ($this->StepsProcessed / $this->TotalSteps) * 100 : 0 @@ -395,7 +395,11 @@ public function getCMSFields() HeaderField::create('JobTimelineTitle', 'Timeline'), LiteralField::create( 'JobTimelineIntro', - '

It is recommended to avoid editing these fields as they are managed by the Queue Runner / Service.

' + sprintf( + '

%s

', + '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)'), @@ -405,20 +409,25 @@ 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 @@ -426,7 +435,11 @@ public function getCMSFields() HeaderField::create('AdvancedTabTitle', 'Advanced fields', 1), LiteralField::create( 'AdvancedTabIntro', - '

It is recommended to avoid editing these fields as they are managed by the Queue Runner / Service.

' + sprintf( + '

%s

', + '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'), @@ -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(