Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
⬆️ Install Laravel Horizon
- Loading branch information
1 parent
5a42e4e
commit 31d4139
Showing
12 changed files
with
337 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Horizon Redis Connection | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This is the name of the Redis connection where Horizon will store the | ||
| meta information required for it to function. It includes the list | ||
| of supervisors, failed jobs, job metrics, and other information. | ||
| | ||
*/ | ||
|
||
'use' => 'default', | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Horizon Redis Prefix | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This prefix will be used when storing all Horizon data in Redis. You | ||
| may modify the prefix when you are running multiple installations | ||
| of Horizon on the same server so that they don't have problems. | ||
| | ||
*/ | ||
|
||
'prefix' => env('HORIZON_PREFIX', 'horizon:'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Queue Wait Time Thresholds | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This option allows you to configure when the LongWaitDetected event | ||
| will be fired. Every connection / queue combination may have its | ||
| own, unique threshold (in seconds) before this event is fired. | ||
| | ||
*/ | ||
|
||
'waits' => [ | ||
'redis:default' => 60, | ||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Job Trimming Times | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you can configure for how long (in minutes) you desire Horizon to | ||
| persist the recent and failed jobs. Typically, recent jobs are kept | ||
| for one hour while all failed jobs are stored for an entire week. | ||
| | ||
*/ | ||
|
||
'trim' => [ | ||
'recent' => 60, | ||
'failed' => 10080, | ||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Queue Worker Configuration | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you may define the queue worker settings used by your application | ||
| in all environments. These supervisors and settings handle all your | ||
| queued jobs and will be provisioned by Horizon during deployment. | ||
| | ||
*/ | ||
|
||
'environments' => [ | ||
'production' => [ | ||
'supervisor-1' => [ | ||
'connection' => 'redis', | ||
'queue' => ['default'], | ||
'balance' => 'simple', | ||
'processes' => 10, | ||
'tries' => 3, | ||
], | ||
], | ||
|
||
'local' => [ | ||
'supervisor-1' => [ | ||
'connection' => 'redis', | ||
'queue' => ['default'], | ||
'balance' => 'simple', | ||
'processes' => 3, | ||
'tries' => 3, | ||
], | ||
], | ||
], | ||
]; |
35 changes: 35 additions & 0 deletions
35
database/migrations/2018_10_02_143729_create_failed_jobs_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateFailedJobsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('failed_jobs', function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->text('connection'); | ||
$table->text('queue'); | ||
$table->longText('payload'); | ||
$table->longText('exception'); | ||
$table->timestamp('failed_at')->useCurrent(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('failed_jobs'); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"/js/app.js": "/js/app.js?id=abd95663ce821390d4fa", | ||
"/css/app.css": "/css/app.css?id=5ce9973b1bc9f6a46cb2", | ||
"/js/app.js.map": "/js/app.js.map?id=125981781d35176ff5f1", | ||
"/css/app.css.map": "/css/app.css.map?id=5d0439ebaab1434c7ea0" | ||
} |