forked from ProcessMaker/processmaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildScriptExecutor.php
More file actions
45 lines (37 loc) · 1010 Bytes
/
BuildScriptExecutor.php
File metadata and controls
45 lines (37 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace ProcessMaker\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
class BuildScriptExecutor implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
// These will be send with the payload
protected $lang;
protected $userId;
// Do not retry this job if it fails
public $tries = 1;
// Building can take some time
public $timeout = 600;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(string $lang, $userId)
{
$this->lang = $lang;
$this->userId = $userId;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
\Artisan::call('processmaker:build-script-executor ' . $this->lang . ' ' . $this->userId . ' --rebuild');
}
}