Update
This commit is contained in:
@@ -21,8 +21,6 @@ public function __construct(
|
||||
private ?int $memeMediaId,
|
||||
private ?int $backgroundMediaId,
|
||||
private array $captionTexts,
|
||||
private string $exportFormat,
|
||||
private string $exportQuality,
|
||||
private Carbon $actionAt,
|
||||
private ?string $userAgent,
|
||||
private ?string $ipAddress,
|
||||
@@ -31,30 +29,25 @@ public function __construct(
|
||||
$this->onQueue('tracking');
|
||||
}
|
||||
|
||||
public function handle(): int
|
||||
public function handle(): void
|
||||
{
|
||||
try {
|
||||
$trackingExport = TrackingExport::create([
|
||||
TrackingExport::create([
|
||||
'device_id' => $this->deviceId,
|
||||
'meme_id' => $this->memeId,
|
||||
'meme_media_id' => $this->memeMediaId,
|
||||
'background_media_id' => $this->backgroundMediaId,
|
||||
'caption_texts' => $this->captionTexts,
|
||||
'export_format' => $this->exportFormat,
|
||||
'export_quality' => $this->exportQuality,
|
||||
'export_status' => 'initiated',
|
||||
'action_at' => $this->actionAt,
|
||||
'user_agent' => $this->userAgent,
|
||||
'ip_address' => $this->ipAddress,
|
||||
'platform' => $this->platform,
|
||||
]);
|
||||
|
||||
return $trackingExport->id;
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Failed to track export', [
|
||||
'device_id' => $this->deviceId,
|
||||
'meme_id' => $this->memeId,
|
||||
'export_format' => $this->exportFormat,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
||||
@@ -67,7 +60,6 @@ public function failed(\Throwable $exception): void
|
||||
Log::error('TrackExportJob failed permanently', [
|
||||
'device_id' => $this->deviceId,
|
||||
'meme_id' => $this->memeId,
|
||||
'export_format' => $this->exportFormat,
|
||||
'exception' => $exception->getMessage(),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user