Skip to content

Commit ae007ca

Browse files
committed
Merge branch 'feature/fixed-missing-queue-error-during-installation'
2 parents 68986de + 1592f15 commit ae007ca

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## [Unreleased]
1010

11+
## [0.1.6] - 2024-12-16
12+
13+
- Fixed missing queue error during installation.
14+
1115
## [0.1.5] - 2024-12-16
1216

1317
- Added module dependency.
@@ -48,7 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4852
- First version of the module
4953
- Added submodule to log user CUD events.
5054

51-
[Unreleased]: https://github.com/OS2web/os2web_audit/compare/0.1.5...HEAD
55+
[Unreleased]: https://github.com/OS2web/os2web_audit/compare/0.1.6...HEAD
56+
[0.1.6]: https://github.com/OS2web/os2web_audit/compare/0.1.5...0.1.6
5257
[0.1.5]: https://github.com/OS2web/os2web_audit/compare/0.1.4...0.1.5
5358
[0.1.4]: https://github.com/OS2web/os2web_audit/compare/0.1.3...0.1.4
5459
[0.1.3]: https://github.com/OS2web/os2web_audit/compare/0.1.2...0.1.3

src/Service/Logger.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,13 @@ private function createLoggingJob(string $type, int $timestamp, string $line, bo
110110

111111
try {
112112
$queueStorage = $this->entityTypeManager->getStorage('advancedqueue_queue');
113-
/** @var \Drupal\advancedqueue\Entity\Queue $queue */
113+
/** @var \Drupal\advancedqueue\Entity\Queue|null $queue */
114114
$queue = $queueStorage->load(self::OS2WEB_AUDIT_QUEUE_ID);
115115

116+
if (NULL === $queue) {
117+
throw new \Exception(sprintf('Queue (%s) not found.', self::OS2WEB_AUDIT_QUEUE_ID));
118+
}
119+
116120
$job = Job::create(LogMessages::class, $payload);
117121

118122
$queue->enqueueJob($job);

0 commit comments

Comments
 (0)