Major refactor of photo processing, video processing still to do
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
|
||||
@@ -30,12 +31,14 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
Route::model('po',Photo::class);
|
||||
|
||||
// Any photo saved, queue it to be moved.
|
||||
Photo::saved(function($photo) {
|
||||
if ($photo->scanned AND ! $photo->duplicate AND ! $photo->remove AND ($x=$photo->moveable()) === TRUE) {
|
||||
if ($photo->scanned && (! $photo->duplicate) && (! $photo->remove) && ($x=$photo->moveable()) === TRUE) {
|
||||
Log::info(sprintf('%s: Need to Move [%s]',__METHOD__,$photo->id.'|'.serialize($x)));
|
||||
|
||||
$this->dispatch((new PhotoMove($photo))->onQueue('move'));
|
||||
PhotoMove::dispatch($photo)->onQueue('move');
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user