Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
patternkit
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
patternkit
Commits
e80da4d7
Commit
e80da4d7
authored
7 months ago
by
Stephen Lucero
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3480636
by slucero, petermallett: Convert QueueWorker Plugins to Use Attributes
parent
6a3da301
No related branches found
No related tags found
1 merge request
!132
[#3480636] Update QueueWorker plugins to use attributes.
Pipeline
#310700
canceled
7 months ago
Stage: build
Stage: validate
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/patternkit_usage_tracking/src/Plugin/QueueWorker/PatternUsageQueueWorker.php
+7
-6
7 additions, 6 deletions
...acking/src/Plugin/QueueWorker/PatternUsageQueueWorker.php
src/Plugin/QueueWorker/LayoutUpdateQueueWorker.php
+7
-6
7 additions, 6 deletions
src/Plugin/QueueWorker/LayoutUpdateQueueWorker.php
with
14 additions
and
12 deletions
modules/patternkit_usage_tracking/src/Plugin/QueueWorker/PatternUsageQueueWorker.php
+
7
−
6
View file @
e80da4d7
...
...
@@ -5,6 +5,8 @@ namespace Drupal\patternkit_usage_tracking\Plugin\QueueWorker;
use
Drupal\Core\Entity\ContentEntityInterface
;
use
Drupal\Core\Entity\EntityTypeManagerInterface
;
use
Drupal\Core\Messenger\MessengerInterface
;
use
Drupal\Core\Queue\Attribute\QueueWorker
;
use
Drupal\Core\StringTranslation\TranslatableMarkup
;
use
Drupal\Core\StringTranslation\TranslationInterface
;
use
Drupal\layout_builder
\LayoutTempstoreRepositoryInterface
;
use
Drupal\layout_builder
\SectionStorage\SectionStorageManagerInterface
;
...
...
@@ -21,13 +23,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* A worker plugin to consume items from the "patternkit_usage_tracking" queue
* and record pattern usages within the referenced layouts.
*
* @QueueWorker(
* id = "patternkit_usage_tracking",
* title = @Translation("Patternkit usage tracking queue"),
* cron = {"time" = 60}
* )
*/
#
[
QueueWorker
(
id
:
'patternkit_usage_tracking'
,
title
:
new
TranslatableMarkup
(
'Patternkit usage tracking queue'
),
cron
:
[
'time'
=>
60
]
)]
class
PatternUsageQueueWorker
extends
LayoutQueueWorkerBase
{
/**
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/QueueWorker/LayoutUpdateQueueWorker.php
+
7
−
6
View file @
e80da4d7
...
...
@@ -3,6 +3,8 @@
namespace
Drupal\patternkit\Plugin\QueueWorker
;
use
Drupal\Core\Entity\ContentEntityInterface
;
use
Drupal\Core\Queue\Attribute\QueueWorker
;
use
Drupal\Core\StringTranslation\TranslatableMarkup
;
use
Drupal\layout_builder
\SectionStorageInterface
;
/**
...
...
@@ -10,13 +12,12 @@ use Drupal\layout_builder\SectionStorageInterface;
*
* A worker plugin to consume items from the "patternkit_layout_updates" queue
* and update patternkit blocks within the referenced layouts.
*
* @QueueWorker(
* id = "patternkit_layout_updates",
* title = @Translation("Patternkit layout updates queue"),
* cron = {"time" = 60}
* )
*/
#
[
QueueWorker
(
id
:
'patternkit_layout_updates'
,
title
:
new
TranslatableMarkup
(
'Patternkit layout updates queue'
),
cron
:
[
'time'
=>
30
]
)]
class
LayoutUpdateQueueWorker
extends
LayoutQueueWorkerBase
{
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment