Stuff
This commit is contained in:
parent
9db8df719d
commit
2531369273
2 changed files with 39 additions and 0 deletions
|
@ -52,6 +52,7 @@ class Image {
|
||||||
return new File("cache", $cacheName);
|
return new File("cache", $cacheName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log::info("Get image from s3");
|
||||||
$file = $this->getRawImage($image);
|
$file = $this->getRawImage($image);
|
||||||
$gallery = Gallery::query()->where("id", "=", $image->gallery)->firstOrFail();
|
$gallery = Gallery::query()->where("id", "=", $image->gallery)->firstOrFail();
|
||||||
$tenant = Tenant::query()->where("id", "=", $gallery->tenant)->firstOrFail();
|
$tenant = Tenant::query()->where("id", "=", $gallery->tenant)->firstOrFail();
|
||||||
|
|
38
app/Jobs/AssignServer.php
Normal file
38
app/Jobs/AssignServer.php
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue