Skip to content

Perform rotation an image without queueing in runtime #2028

Answered by RainXC
RainXC asked this question in Q&A
Discussion options

You must be logged in to vote

After a little research, I've found a decision.

// Manipulaitons with $media ...

// Dispatch job immediately
$profileCollection = ConversionCollection::createForMedia($media);
dispatch_now(app(
  config('media-library.jobs.perform_conversions'),
    [
      'media'       => $media,
      'conversions' => $profileCollection->getQueuedConversions($media->collection_name)
    ]
));

But another job (in the queue) after saving the media will be dispatched too of course.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by freekmurze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant