Skip to content

Commit 15b915f

Browse files
committed
Job descriptions
1 parent 741aa39 commit 15b915f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Plugin.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public function init()
7171

7272
// Queue the send request up
7373
Craft::$app->getQueue()->push(new SendWebhookJob([
74+
'description' => Craft::t('webhooks', 'Sending webhook “{name}”', [
75+
'name' => $webhook->name,
76+
]),
7477
'url' => $webhook->url,
7578
'data' => $data,
7679
]));

src/SendWebhookJob.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ class SendWebhookJob extends BaseJob
2424
*/
2525
public $data;
2626

27+
/**
28+
* @inheritdoc
29+
*/
30+
public function defaultDescription()
31+
{
32+
return Craft::t('webhooks', 'Sending webhook');
33+
}
34+
2735
/**
2836
* @inheritdoc
2937
*/

0 commit comments

Comments
 (0)