Skip to content

Commit

Permalink
added save to s3
Browse files Browse the repository at this point in the history
  • Loading branch information
innoflash committed May 5, 2020
1 parent ace2516 commit 34de25a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/Jobs/Saved/S3Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@

namespace Innoflash\Events\Jobs\Saved;

use FaithGen\SDK\Traits\SavesToAmazonS3;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
use Innoflash\Events\Models\Event;

class S3Upload implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
use Dispatchable,
InteractsWithQueue,
Queueable,
SerializesModels,
SavesToAmazonS3;

public $deleteWhenMissingModels = true;
protected $event;
Expand All @@ -33,6 +39,10 @@ public function __construct(Event $event)
*/
public function handle()
{
//
try {
$this->saveFiles($this->event);
} catch (\Exception $e) {
Log::error($e->getMessage());
}
}
}

0 comments on commit 34de25a

Please sign in to comment.