mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-14 07:27:47 +00:00
Move current_image caching to plugins
This commit is contained in:
parent
6bfd9a2d8b
commit
4aa67ce02d
6 changed files with 18 additions and 18 deletions
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\PlaylistItem;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class GeneratePlaylistItemJob implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly int $playlistItemId,
|
||||
private readonly string $markup
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
$newImageUuid = CommonFunctions::generateImage($this->markup);
|
||||
|
||||
PlaylistItem::find($this->playlistItemId)->update(['current_image' => $newImageUuid]);
|
||||
\Log::info("Playlist item $this->playlistItemId: updated with new image: $newImageUuid");
|
||||
|
||||
CommonFunctions::cleanupFolder();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue