mirror of https://github.com/pixelfed/pixelfed
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			31 lines
		
	
	
		
			667 B
		
	
	
	
		
			PHP
		
	
			
		
		
	
	
			31 lines
		
	
	
		
			667 B
		
	
	
	
		
			PHP
		
	
<?php
 | 
						|
 | 
						|
namespace App\Jobs\MediaPipeline;
 | 
						|
 | 
						|
use App\Media;
 | 
						|
use Cache;
 | 
						|
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\Redis;
 | 
						|
use App\Services\MediaStorageService;
 | 
						|
 | 
						|
class MediaStoragePipeline implements ShouldQueue
 | 
						|
{
 | 
						|
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
 | 
						|
 | 
						|
    protected $media;
 | 
						|
 | 
						|
    public function __construct(Media $media)
 | 
						|
    {
 | 
						|
    	$this->media = $media;
 | 
						|
    }
 | 
						|
 | 
						|
    public function handle()
 | 
						|
    {
 | 
						|
    	MediaStorageService::store($this->media);
 | 
						|
    }
 | 
						|
 | 
						|
} |