| | |
| | | namespace JVBase\managers\queue\executors; |
| | | |
| | | use JVBase\managers\queue\{Executor, Operation, Progress, Queue, Result}; |
| | | use JVBase\inc\managers\ErrorHelper; |
| | | use JVBase\managers\Cache; |
| | | use JVBase\managers\Errors; |
| | | use JVBase\managers\UploadManager; |
| | |
| | | */ |
| | | final class UploadExecutor implements Executor |
| | | { |
| | | use ErrorHelper; |
| | | private const HANDLED_TYPES = [ |
| | | 'image_upload', |
| | | 'video_upload', |
| | |
| | | }; |
| | | |
| | | } catch (Exception $e) { |
| | | Errors::getInstance()->log( |
| | | '[UploadExecutor]:execute', |
| | | $e->getMessage(), |
| | | [ |
| | | $this->logError($e->getMessage(), 'execute', [ |
| | | 'operation_id' => $operation->id, |
| | | 'operation_type' => $operation->type, |
| | | 'user_id' => $operation->userId, |
| | | ] |
| | | ); |
| | | ]); |
| | | |
| | | return new Result( |
| | | outcome: 'failed', |