Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Jobs;
- use Illuminate\Bus\Queueable;
- use Illuminate\Queue\SerializesModels;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Foundation\Bus\Dispatchable;
- class Syncronize implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
- /**
- * The number of times the job may be attempted
- * @var int
- */
- public $tries = 1;
- /**
- * the file to process
- * @var string
- */
- protected $file;
- /**
- * Create a new job instance.
- *
- * @return void
- */
- public function __construct($file)
- {
- $this->file = $file;
- }
- /**
- * Execute the job.
- *
- * @return void
- */
- public function handle()
- {
- \Artisan::call('giacenze', [
- 'file' => $this->file,
- '--force' => true
- ]);
- \Artisan::call('giacenzesplit', [
- '--file' => $this->file
- ]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement