laravel / horizon Goto Github PK
View Code? Open in Web Editor NEWDashboard and code-driven configuration for Laravel queues.
Home Page: https://laravel.com/docs/horizon
License: MIT License
Dashboard and code-driven configuration for Laravel queues.
Home Page: https://laravel.com/docs/horizon
License: MIT License
I am currently testing out ^0.1.0
of horizon, and I noticed an issue with the dashboard. After navigating through the routes multiple times, I see an increase the number of api requests. It also appears that these requests from one page continue even after visiting another page with vue-router.
I believe the issue lies in how setInterval()
is being called but not managed in each of the Vue components. Each time a component is mounted()
a new interval is created.
Here's my thought on a solution:
setInterval()
to a data variable on each component, such as this.interval = setInterval()
clearInterval(this.interval)
whenever a component is no longer in use (i.e. destroyed, deactivated, etc)Here are the unmanaged setInterval() calls:
If you'd like a pull request, let me know.
If you have a worker that has multiple queues, like: high,default
several places doesn't work, like Current Workload > Jobs
and Current Workload > Wait
.
Nothing is broken, but it simply doesn't load data properly.
Hi,
When i try to install Horizon on windows dev machine it gives following error
Problem 1
- Installation request for laravel/horizon dev-master -> satisfiable by laravel/horizon[dev-master].
- laravel/horizon dev-master requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
But pcntl is not available for windows
How to install without pcntl.
When running Horizon on a non-dev environment
Hi,
I'm testing around with horizon with a new Laravel 5.5 app.
I created a Job that throws an Exception after a second to emulate a failing job.
The only settings I have changed are queue and broadcast driver to redis. But when queue the job, I always get another Exception too:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'jarvis.failed_jobs' doesn't exist (SQL: insert into `failed_jobs` (`connection`, `queue`, `payload`, `exception`, `failed_at`)...
I know I can create this table with artisan, but my question is: Should the jobs be stored in both? the failed_jobs
table and the redis? Or am I missing a configuration? There is only one implemented JobRepository https://github.com/laravel/horizon/blob/9ab7c9fd041674f48a47049a5a88350586c7fbb0/src/Repositories/RedisJobRepository.php I could found. That makes me completely baffled -.-.
Thank you.
Will forge be updated to use Horizon configuration when using workers?
Should note on README.md that most or all PHP versions do not enable PCNTL by default. The php versions should be compiled with --enable-pcntl
https://gist.github.com/jbanety/35d01689608ad89777d349f65c7b39c9
Added a repository with the PHP extensions compiled to version:
https://github.com/johnpaulmedina/php7-pcntl-extensions
i have an issue. understand, that it's about my configuration, but i can't get with it.
when running horizon it lock the php, so it can not work on other tasks. tried via both apache and cli.
php interactive shell (php -a) works. but when i want to run some php file - it doesn't
when i terminate the horizon all php task get processed.
im running horizon on my macbook, have apache 2.4 with mpm prefork module installed via home brew. php 7.1. laravel 5.5 upgraded from 5.2.
Is there any way to use middleware for route?
I'm using public $timeout = 3600
inside my job and tries => 1
in horizon.php and I got Illuminate\Queue\MaxAttemptsExceededException: A queued job has been attempted too many times. The job may have previously timed out.
.
[2017-08-18 02:56:48] Processing: App\Jobs\VideosJob
[2017-08-18 02:58:19] Processing: App\Jobs\VideosJob
[2017-08-18 02:58:19] Failed: App\Jobs\VideosJob
[2017-08-18 03:01:53] Processed: App\Jobs\VideosJob
The job runs one time until finish like how I want and the process it's not killed. Weird!
With tries => 0
my output is
[2017-08-18 02:45:28] Processing: App\Jobs\VideosJob
[2017-08-18 02:46:59] Processing: App\Jobs\VideosJob
[2017-08-18 02:48:29] Processing: App\Jobs\VideosJob
[2017-08-18 02:50:00] Processing: App\Jobs\VideosJob
[2017-08-18 02:51:04] Processed: App\Jobs\VideosJob
[2017-08-18 02:51:04] Processed: App\Jobs\VideosJob
[2017-08-18 02:51:04] Processed: App\Jobs\VideosJob
[2017-08-18 02:51:05] Processed: App\Jobs\VideosJob
The job runs four times. 😢
My job fails every 90 seconds even I use public $timeout = 3600
inside job or 'timeout' => 3600
in horizon.php.
Metric Jobs and Queues return an array_flip(): Can only flip STRING and INTEGER values!
error for src/Repositories/RedisMetricsRepository.php
on line 234
. If I see it right, the problem is, scores are stored as floats, not as integers, and floats cannot be array keys. Sadly I'm not an expert in Redis (not even a beginner yet sadly), so at this point I can't propose a PR (but I guess either we should have integer scores, we should cast them before flipping, or we shouldn't flip).
By the way I'm on PHP 7.1, with Horizon 1.0.0 and Laravel 5.5.
Is there a way or can it be used within a 5.4 app? Would be great if it can.
By default Horizon uses Redis databases 9
, 10
, 11
, 12
, 13
, 14
, 15
for jobs, supervisors, tags, metrics, locks, etc.
I'm sure it makes sense to avoid userland namespace conflicts, like job:{id}
.
Can Horizon be configured to only use one or two databases? Are there any drawbacks to that? Maybe all Horizon keys could be prefixed with horizon:
?
I'm asking because a lot of Redis hosting providers only supply a single database 0
, some offer more in higher tiers, very few offer 16
out of the box.
If you resolve Console/Kernel and call all() method on it from a web route, the list of commands returned do not include horizon commands. Found out that horizon command registration is wrapped inside runningInConsole() check.
if ($this->app->runningInConsole()) {
$this->commands([
Console\AssetsCommand::class,
Console\HorizonCommand::class,
Console\ListCommand::class,
Console\PurgeCommand::class,
Console\PauseCommand::class,
Console\ContinueCommand::class,
Console\SnapshotCommand::class,
Console\SupervisorCommand::class,
Console\SupervisorsCommand::class,
Console\TerminateCommand::class,
Console\TimeoutCommand::class,
Console\WorkCommand::class,
]);
}
I understand these commands are not required to be registered in the container for HTTP requests but would it be possible to at least take the Console\SnapshotCommand::class out of the console check and make it available in app container for HTTP requests. This would help if you are scheduling commands using http requests.
http://laravel55.dev/horizon/api/stats
{
"message": "Parse error: syntax error, unexpected '='",
"file": "/home/laravel/Sites/laravel55/vendor/laravel/horizon/src/WaitTimeCalculator.php",
"line": 75,
"trace": [
{
"file": "/home/laravel/Sites/laravel55/vendor/composer/ClassLoader.php",
"line": 301,
"function": "Composer\\Autoload\\includeFile",
"args": [
"/home/laravel/Sites/laravel55/vendor/laravel/horizon/src/WaitTimeCalculator.php"
]
},
{
"function": "loadClass",
"class": "Composer\\Autoload\\ClassLoader",
"type": "->",
"args": [
"Laravel\\Horizon\\WaitTimeCalculator"
]
},
{
"function": "spl_autoload_call",
"args": [
"Laravel\\Horizon\\WaitTimeCalculator"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 752,
"function": "__construct",
"class": "ReflectionClass",
"type": "->",
"args": [
"Laravel\\Horizon\\WaitTimeCalculator"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 631,
"function": "build",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
"Laravel\\Horizon\\WaitTimeCalculator"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 586,
"function": "resolve",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
"Laravel\\Horizon\\WaitTimeCalculator",
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Application.php",
"line": 721,
"function": "make",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
"Laravel\\Horizon\\WaitTimeCalculator",
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php",
"line": 107,
"function": "make",
"class": "Illuminate\\Foundation\\Application",
"type": "->",
"args": [
"Laravel\\Horizon\\WaitTimeCalculator"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php",
"line": 677,
"function": "app",
"args": [
"Laravel\\Horizon\\WaitTimeCalculator"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/horizon/src/Http/Controllers/DashboardStatsController.php",
"line": 28,
"function": "resolve",
"args": [
"Laravel\\Horizon\\WaitTimeCalculator"
]
},
{
"function": "index",
"class": "Laravel\\Horizon\\Http\\Controllers\\DashboardStatsController",
"type": "->",
"args": []
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Controller.php",
"line": 54,
"function": "call_user_func_array",
"args": [
[
{},
"index"
],
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
"line": 45,
"function": "callAction",
"class": "Illuminate\\Routing\\Controller",
"type": "->",
"args": [
"index",
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 204,
"function": "dispatch",
"class": "Illuminate\\Routing\\ControllerDispatcher",
"type": "->",
"args": [
{
"uri": "horizon/api/stats",
"methods": [
"GET",
"HEAD"
],
"action": {
"uses": "Laravel\\Horizon\\Http\\Controllers\\DashboardStatsController@index",
"controller": "Laravel\\Horizon\\Http\\Controllers\\DashboardStatsController@index",
"namespace": "Laravel\\Horizon\\Http\\Controllers",
"prefix": "horizon",
"where": []
},
"controller": {},
"defaults": [],
"wheres": [],
"parameters": [],
"parameterNames": [],
"computedMiddleware": [
"Laravel\\Horizon\\Http\\Middleware\\Authenticate"
],
"compiled": {}
},
{},
"index"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 161,
"function": "runController",
"class": "Illuminate\\Routing\\Route",
"type": "->",
"args": []
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 612,
"function": "run",
"class": "Illuminate\\Routing\\Route",
"type": "->",
"args": []
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 30,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Router",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/horizon/src/Http/Middleware/Authenticate.php",
"line": 18,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Laravel\\Horizon\\Http\\Middleware\\Authenticate",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 102,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 614,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 573,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->",
"args": [
{
"uri": "horizon/api/stats",
"methods": [
"GET",
"HEAD"
],
"action": {
"uses": "Laravel\\Horizon\\Http\\Controllers\\DashboardStatsController@index",
"controller": "Laravel\\Horizon\\Http\\Controllers\\DashboardStatsController@index",
"namespace": "Laravel\\Horizon\\Http\\Controllers",
"prefix": "horizon",
"where": []
},
"controller": {},
"defaults": [],
"wheres": [],
"parameters": [],
"parameterNames": [],
"computedMiddleware": [
"Laravel\\Horizon\\Http\\Middleware\\Authenticate"
],
"compiled": {}
},
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 551,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 176,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 30,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/fideloper/proxy/src/TrustProxies.php",
"line": 56,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Fideloper\\Proxy\\TrustProxies",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 30,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 30,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php",
"line": 46,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 102,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 151,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 116,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/public/index.php",
"line": 55,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/.composer/vendor/cpriego/valet-linux/server.php",
"line": 197,
"args": [
"/home/laravel/Sites/laravel55/public/index.php"
],
"function": "require"
}
]
}
http://laravel55.dev/horizon/api/workload
{
"message": "Parse error: syntax error, unexpected '='",
"file": "/home/laravel/Sites/laravel55/vendor/laravel/horizon/src/Repositories/RedisWorkloadRepository.php",
"line": 70,
"trace": [
{
"file": "/home/laravel/Sites/laravel55/vendor/composer/ClassLoader.php",
"line": 301,
"function": "Composer\\Autoload\\includeFile",
"args": [
"/home/laravel/Sites/laravel55/vendor/laravel/horizon/src/Repositories/RedisWorkloadRepository.php"
]
},
{
"function": "loadClass",
"class": "Composer\\Autoload\\ClassLoader",
"type": "->",
"args": [
"Laravel\\Horizon\\Repositories\\RedisWorkloadRepository"
]
},
{
"function": "spl_autoload_call",
"args": [
"Laravel\\Horizon\\Repositories\\RedisWorkloadRepository"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 752,
"function": "__construct",
"class": "ReflectionClass",
"type": "->",
"args": [
"Laravel\\Horizon\\Repositories\\RedisWorkloadRepository"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 631,
"function": "build",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
"Laravel\\Horizon\\Repositories\\RedisWorkloadRepository"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 586,
"function": "resolve",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
"Laravel\\Horizon\\Repositories\\RedisWorkloadRepository",
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Application.php",
"line": 721,
"function": "make",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
"Laravel\\Horizon\\Repositories\\RedisWorkloadRepository",
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 256,
"function": "make",
"class": "Illuminate\\Foundation\\Application",
"type": "->",
"args": [
"Laravel\\Horizon\\Repositories\\RedisWorkloadRepository",
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 749,
"function": "Illuminate\\Container\\{closure}",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
{
"contextual": []
},
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 631,
"function": "build",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Container/Container.php",
"line": 586,
"function": "resolve",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
"Laravel\\Horizon\\Contracts\\WorkloadRepository",
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Application.php",
"line": 721,
"function": "make",
"class": "Illuminate\\Container\\Container",
"type": "->",
"args": [
"Laravel\\Horizon\\Contracts\\WorkloadRepository",
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php",
"line": 79,
"function": "make",
"class": "Illuminate\\Foundation\\Application",
"type": "->",
"args": [
"Laravel\\Horizon\\Contracts\\WorkloadRepository"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php",
"line": 45,
"function": "transformDependency",
"class": "Illuminate\\Routing\\ControllerDispatcher",
"type": "->",
"args": [
{
"name": "workload"
},
[]
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/RouteDependencyResolverTrait.php",
"line": 27,
"function": "resolveMethodDependencies",
"class": "Illuminate\\Routing\\ControllerDispatcher",
"type": "->",
"args": [
[],
{
"name": "index",
"class": "Laravel\\Horizon\\Http\\Controllers\\WorkloadController"
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
"line": 41,
"function": "resolveClassMethodDependencies",
"class": "Illuminate\\Routing\\ControllerDispatcher",
"type": "->",
"args": [
[],
{},
"index"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 204,
"function": "dispatch",
"class": "Illuminate\\Routing\\ControllerDispatcher",
"type": "->",
"args": [
{
"uri": "horizon/api/workload",
"methods": [
"GET",
"HEAD"
],
"action": {
"uses": "Laravel\\Horizon\\Http\\Controllers\\WorkloadController@index",
"controller": "Laravel\\Horizon\\Http\\Controllers\\WorkloadController@index",
"namespace": "Laravel\\Horizon\\Http\\Controllers",
"prefix": "horizon",
"where": []
},
"controller": {},
"defaults": [],
"wheres": [],
"parameters": [],
"parameterNames": [],
"computedMiddleware": [
"Laravel\\Horizon\\Http\\Middleware\\Authenticate"
],
"compiled": {}
},
{},
"index"
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 161,
"function": "runController",
"class": "Illuminate\\Routing\\Route",
"type": "->",
"args": []
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 612,
"function": "run",
"class": "Illuminate\\Routing\\Route",
"type": "->",
"args": []
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 30,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Router",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/horizon/src/Http/Middleware/Authenticate.php",
"line": 18,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Laravel\\Horizon\\Http\\Middleware\\Authenticate",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 102,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 614,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 573,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->",
"args": [
{
"uri": "horizon/api/workload",
"methods": [
"GET",
"HEAD"
],
"action": {
"uses": "Laravel\\Horizon\\Http\\Controllers\\WorkloadController@index",
"controller": "Laravel\\Horizon\\Http\\Controllers\\WorkloadController@index",
"namespace": "Laravel\\Horizon\\Http\\Controllers",
"prefix": "horizon",
"where": []
},
"controller": {},
"defaults": [],
"wheres": [],
"parameters": [],
"parameterNames": [],
"computedMiddleware": [
"Laravel\\Horizon\\Http\\Middleware\\Authenticate"
],
"compiled": {}
},
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 551,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 176,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 30,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/fideloper/proxy/src/TrustProxies.php",
"line": 56,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Fideloper\\Proxy\\TrustProxies",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 30,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 30,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php",
"line": 46,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 149,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 102,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 151,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->",
"args": [
{}
]
},
{
"file": "/home/laravel/Sites/laravel55/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 116,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/Sites/laravel55/public/index.php",
"line": 55,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/home/laravel/.composer/vendor/cpriego/valet-linux/server.php",
"line": 197,
"args": [
"/home/laravel/Sites/laravel55/public/index.php"
],
"function": "require"
}
]
}
I know this is not specifically related to Horizon but he used it a few times during the video. Is it just a custom alias for an auto-git-commit ?
I also like the command he used to deploy to the cloud
Are these Envoyer-related? Is there somewhere where those most excellent shortcuts are shared? Would love to become more productive and use these myself!
What about switching from Less to SASS - SASS is much more used now
Bootstrap 4 will also use SASS syntax
Dear !
My main application are running on laravel 5.3. I wonder that I created a blank separate project to install laravel 5.5 + horizon and then I put my application redis connection into this project.
But when I run horizon, It do not show any metrics .
Can you tell me , which part I was wrong ?
> php artisan horizon
Horizon started successfully.
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined function Laravel\Horizon\Console\pcntl_async_signals()
Hi Guys,
I'm experiencing problems with the Horizon Dashboard. The stats on the main dashboard page are not loading at all. I am running PHP 7.1.8 on Laravel Valet 2.0.5.
I've used the Network tab on Chrome DevTools and there seems to be a few ajax requests that are failing due to being returned a 500 error: Screenshot of Chrome DevTools
I have put the two different stacktraces into Gist's as they are too long to post in this issue apparently. Gist 1 - Gist 2
Any help is appreciated. Thanks in advance.
Will there be support beanstalkd queues?
I am eager to know ,is horizion need axios? I can't find axios this horizon project .
I see there is a Laravel\Horizon\RedisQueue
class extending Illuminate\Queue\RedisQueue
.
I have also my own extension of Illuminate\Queue\RedisQueue
that works exactly like the base class except the way it pops jobs out of the queue.
What is the best way to have my own queue driver supported by horizon?
I've tried to run Horizon from Supervisor and I can access backend but supervisor-1
wasn't there and there were no available processes shown. Log says:
Horizon started successfully.
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan
The only difference I was able to track was the full path used in Supervisor command. So I've tried one level up and Horizon output for php website/artisan horizon
looks the same as above.
I guess internally Horizon tries to run another command and assumes it's always started from inside project directory?
Is there currently no Way to extend the Backend with own Functions?
Because i don`t see any extra Views / Assets Folder for Horizon.
Now , I created the new system as horizon system . but i want to don't change my old system 's code. in new system , I operated the command "php artisan horizon". now I created a job in the old system. but this job is operated in the new system. I just want to use the horizon system as a monitor system. Do you have some solutions .
d00d0b this repo make horizon use one redis. I think prefix can be optional.
public static function use($connection, $prefix = null)
{
$config = config("database.redis.{$connection}");
config(['database.redis.horizon' => array_merge($config, [
'options' => ['prefix' => $prefix ?: 'horizon:']
])]);
}
Multiple apps use one redis server in aws, i think they can use one redis connection shared in different apps.
I'm yet to figure out why this is happening...
protected function timeToClearPerQueue(Supervisor $supervisor, Collection $pools)
--
| {
| return $pools->mapWithKeys(function ($pool, $queue) use ($supervisor) {
| $size = $this->queue->connection($supervisor->options->connection)->readyNow($queue);
|
| return [$queue => ($size * $this->metrics->runtimeForQueue($queue))];
| });
I see a lot of references to Redis but can Horizon also be used with the database driver?
I use the laravel -dev.
I think that is 5.5 but also can't be used within a 5.5 dev?
Thanks
Horizon allows us to monitoring an empty tag name and unable to stop monitoring the empty tag, returning an error MethodNotAllowedHttpException
because the DELETE request is made on another route.
Dear !
I really want this feature. But I can not find a way to update to laravel 5.5 , or any document related to laravel 5.5 dev branch
Can you point me to that ?
As a proposal for notifications is to catch problems with not only too much jobs in queue, but also too little. So we can see if something is "stuck" and does not dispatch jobs into queue as usual.
So maybe some metric "Time since last job added" and configure some threshold for alert/notification when this is reached.
Is there a way to change the route prefix? I'm looking to make this a standalone app, so it would be nice to have it served from the root instead of /horizon
.
State is currently managed per component/page. Moving to Vuex will allow better state management and enable data sharing between components/pages.
Here is the steps I do:
composer require laravel/horizon
php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
cp vendor/laravel/horizon/config/horizon.php config/
Then I execute
php artisan horizon
it show me the error:
[Symfony\Component\Console\Exception\CommandNotFoundException] Command "horizon" is not defined.
Here is the logs:
#0 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(209): Symfony\Component\Console\Application->find('horizon') #1 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #2 /var/www/laravel-stock-calc/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 /var/www/laravel-stock-calc/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #4 {main} [2017-08-12 14:30:01] local.ERROR: Symfony\Component\Console\Exception\CommandNotFoundException: Command "horizon" is not defined. in /var/www/laravel-stock-calc/vendor/symfony/console/Application.php:584 Stack trace: #0 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(209): Symfony\Component\Console\Application->find('horizon') #1 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #2 /var/www/laravel-stock-calc/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 /var/www/laravel-stock-calc/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #4 {main} [2017-08-12 14:30:22] local.ERROR: Symfony\Component\Console\Exception\CommandNotFoundException: Command "horizon" is not defined. in /var/www/laravel-stock-calc/vendor/symfony/console/Application.php:584 Stack trace: #0 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(209): Symfony\Component\Console\Application->find('horizon') #1 /var/www/laravel-stock-calc/vendor/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #2 /var/www/laravel-stock-calc/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 /var/www/laravel-stock-calc/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #4 {main}
Brand new installation of Laravel 5.5 and horizon. Nothing else has been added to Laravel. For installation I ran:
composer create-project laravel/laravel laravel55 dev-develop
cd laravel55
composer install laravel/horizon
php artisan vendor:publish # (Selected option 0)
php artisan serv
and in another console I ran php artisan horizon
In case it helps I am running this on a Windows development machine if that might cause any issues.
I have found that I can eventually retry all failed jobs after multiple page refreshes. However, I noticed that some retry attempts do not actually succeed after clicking the retry button. When I pulled up the web inspector, I found that these requests had a 419 unknown status response from the server with a response containing.
{
"message": ""
}
I don't know the reason for this error (nginx, php 7.1, ubuntu 16.04), but some error handling on the retry button's axios request would at least allow a user to reattempt another retry if a 419 occurs without a full page refresh.
Here: https://laravel.com/docs/master/horizon
In Supervisor section and config
[program:horizon]
process_name=%(program_name)
I think that should be %(program_name)s
, the s
is missing. I don't know why, devOps is not my thing. But I had "badly formatted" error and now it works.
Description:
Can't publish the package assets or the "horizon.php" config file.
Steps To Reproduce:
composer require laravel/horizon
Then:
php artisan vendor:publish
Result
As discussed with @themsaid, the cache:clear
command calls FLUSHDB
, which will delete all Horizon data, or other application data stored in Redis.
Horizon depends on ext-pcntl
, so that requirement should be listed in composer.json
.
Hi, i'm currently near to deploy a big app with Laravel 5.5 but a little issue persist...
when I put QUEUE_DRIVER to sync, my uploading job works perfectly but when i put redis, for working with the 'art horizon' command, it tooks a while and after a lot of retries my job fail ...
this is my job :
<?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;
use Storage;
use File;
class UploadVideo implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $filename;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($filename)
{
$this->filename = $filename;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$file = storage_path() . '/uploads/' . $this->filename;
if (Storage::disk('s3drop')->put($this->filename, fopen($file, 'r+'))) {
File::delete($file);
}
}
}
Hope someone can tell me what's is going on thanks :/
I'm trying to access the logged in User so I can validate if the dashboard should be shown but inside the Horizon::auth
callback all attempts to get the User from the request return null
. I'm presuming this is because the session middleware hasn't fired yet? Has anyone else come across this and found a solution?
I've tried calling the auth method in the register
and boot
methods of my AppServiceProvider
fyi.
Reading the README I've seen that Horizon requires PHP 7.1+ & Laravel 5.5 but Laravel 5.5 requires 7.0+...
Is this a mistake or is intended and we won't be able to use Horizon with Laravel in a PHP 7.0 environment.
This could be an obvious answer, but if so, I'm interested in why 7.1+ and not 7.0+. I mean, what's the key feature that doesn't allow this package to downgrade to 7.0.
Thanks!
Is there any chance to use Horizon with Laravel 5.3 or 5.4?
Thanks
Sometimes we want hide sensitive information from logs because of security reasons.
In the current situation when queue jobs failed it displays all the properties of the object in failed jobs insight.
Ex:
User
- id
- name
- email
Above example user object has name
and email
property, but when queue job failed we only want to display id
and name
. We want to ignore email
when log payload
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.