Skip to content

Commit 2e0c9c3

Browse files
committed
allow to specify queue at dispatchConversion level
1 parent 92d7b10 commit 2e0c9c3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

resources/views/components/img.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232

3333
<img {!! $attributes !!} loading="{{ $loading }}" src="{!! $src ?? $source?->getUrl(parameters: $parameters) !!}"
3434
height="{{ $height ?? $source?->height }}" width="{{ $width ?? $source?->width }}" alt="{{ $alt ?? $source?->name }}"
35-
@if ($placeholderContents) style="background-size:cover;background-image: url(data:image/jpeg;base64,{{ $placeholderContents }})" @endif>
35+
@if ($placeholderContents) style="background-size:cover;background-image: url(data:image/jpeg;base64,{{ $placeholderContents }})" @endif />

src/Models/Media.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ public function getChildrenConversionsDefinitions(string $name): array
256256
public function dispatchConversion(
257257
string $conversion,
258258
bool $force = true,
259+
?string $queue = null
259260
): ?PendingDispatch {
260261
if (
261262
$force === false &&
@@ -270,8 +271,10 @@ public function dispatchConversion(
270271

271272
$job = dispatch($converter->conversion($conversion));
272273

273-
if ($queue = $definition->queue) {
274+
if ($queue) {
274275
$job->onQueue($queue);
276+
} elseif ($definition->queue) {
277+
$job->onQueue($definition->queue);
275278
}
276279

277280
return $job;

0 commit comments

Comments
 (0)