Skip to content

Commit

Permalink
Merge pull request #16228 from craftcms/feature/queue-manager-classname
Browse files Browse the repository at this point in the history
Add classname to queue manager/job view
  • Loading branch information
brandonkelly authored Nov 29, 2024
2 parents 2841098 + a922ac3 commit 5036ed3
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
## Content Management
- The global sidebar no longer shows “Failed” for queue jobs, for users that don’t have access to the Queue Manager. ([#16184](https://github.com/craftcms/cms/issues/16184))

## Administration
- The Queue Manager utility now shows jobs’ class names. ([#16228](https://github.com/craftcms/cms/pull/16228))

## System
- Updated Twig to 3.15. ([#16207](https://github.com/craftcms/cms/discussions/16207))
1 change: 1 addition & 0 deletions src/queue/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ public function getJobDetails(string $id): array
$job = $this->serializer->unserialize($this->_jobData($result['job']));

return ArrayHelper::filterEmptyStringsFromArray([
'class' => $job::class,
'delay' => max(0, $result['timePushed'] + $result['delay'] - time()),
'status' => $this->_status($result),
'error' => $result['error'] ?? '',
Expand Down
3 changes: 3 additions & 0 deletions src/templates/_components/utilities/QueueManager/content.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<template v-else-if="name == 'ttr'">
[[ttrValue(value)]]
</template>
<template v-else-if="name == 'class'">
<code>[[value]]</code>
</template>
<template v-else>
[[value]]
</template>
Expand Down
1 change: 1 addition & 0 deletions src/translations/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
'Choose which user groups should have access to this source.' => 'Choose which user groups should have access to this source.',
'Choose' => 'Choose',
'City' => 'City',
'Class' => 'Class',
'Clear Caches' => 'Clear Caches',
'Clear all' => 'Clear all',
'Clear caches' => 'Clear caches',
Expand Down
1 change: 1 addition & 0 deletions src/web/assets/queuemanager/QueueManagerAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function registerAssetFiles($view): void
'Job released.',
'Retrying all failed jobs.',
'ID',
'Class',
'{num, number} {num, plural, =1{second} other{seconds}}',
'Time to reserve',
'Status',
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/queuemanager/dist/queue-manager.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5036ed3

Please sign in to comment.