This commit is contained in:
Kekskurse 2021-05-17 23:19:12 +02:00
parent 9db8df719d
commit 2531369273
Signed by: kekskurse
GPG Key ID: 728ACCB59341E7E4
2 changed files with 39 additions and 0 deletions

View File

@ -52,6 +52,7 @@ class Image {
return new File("cache", $cacheName);
}
Log::info("Get image from s3");
$file = $this->getRawImage($image);
$gallery = Gallery::query()->where("id", "=", $image->gallery)->firstOrFail();
$tenant = Tenant::query()->where("id", "=", $gallery->tenant)->firstOrFail();

38
app/Jobs/AssignServer.php Normal file
View File

@ -0,0 +1,38 @@
<?php
namespace App\Jobs;
use App\Models\Image;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class AssignServer implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle(Image $image)
{
if(!is_null($image->servername)) {
return;
}
}
}