PHP code example of jdlxnl / task
1. Go to this page and download the library: Download jdlxnl/task library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jdlxnl / task example snippets
[
...
'defaults' => [
'supervisor-1' => [
'connection' => 'redis',
'queue' => ['default'],
'balance' => 'auto',
'maxProcesses' => 1,
'memory' => 256,
'tries' => 1,
'nice' => 0,
'timeout' => 900 // set very high, have jobs control their own timeout
],
],
'environments' => [
'production' => [
'supervisor-1' => [
'maxProcesses' => 2,
'balanceMaxShift' => 1,
'balanceCooldown' => 3,
'sleep' => 1
],
],
'staging' => [
'supervisor-1' => [
'maxProcesses' => 1,
],
],
'local' => [
'supervisor-1' => [
'maxProcesses' => 3,
],
],
]
...
]
Route::apiResource('task-log', \Jdlx\Task\Http\Controllers\Api\TaskLogController::class);
shell
php artisan vendor:publish --provider="Jdlx\Slack\JdlxSlackServiceProvider"
php artisan vendor:publish --provider="Jdlx\Task\JdlxTaskServiceProvider"
php artisan migrate
shell
composer orzion:publish
php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
ini
SLACK_WEBHOOK=https://hooks.slack.com/services/asd/B01HB2M20asdf4V/s8GCasfsaDJesxH3ZyZuHUx
SLACK_DEFAULT_CHANNEL=my-channel