-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with timestamps (NaNs, Invalid date) #371
Comments
Same bug here... I don't have any timestamp (NaNs values) on all queued (recent and failed) jobs. |
Same issue. I think the problems occurs because horizon api returns failed_at and reserved_at as string (not as float) which can not be parsed within the vue component (result: NaNs and Invalid date) :
Part of API response (/horizon/api/jobs/failed): {"jobs": [
{
"id": "808121",
"connection": "redis",
"queue": "title:resources",
"name": "App\\Jobs\\TrackTitle",
"status": "failed",
"payload": {},
"exception": "...",
"failed_at": "1535147607,7085",
"completed_at": null,
"retried_by": [],
"reserved_at": "1535147607,6773",
"index": 0
}
]} I have not yet figured out why failed_at and reserved_at are not set / parsed correctly in the api response. Same problems occurs with /horizon/api/jobs/recent and horizon/monitoring (detail page) API requests. |
I had the same some time ago. Republishing the assets did the trick then..? |
Unfortunately, republishing the assets did not solve it.
Temporary solution for now is changing the indexJobs method on Laravel\Horizon\Repositories\RedisJobRepository (on line 195). I'm now forcing the failed_at, completed_at, and reserved_at to act as float instead of being a string:
Will have to look further why values are stored as strings. |
Hmm I can see how this can be a problem. Like you indicated @davidruigrok we'd probably need to cast the values to their proper types first. Not sure if your approach is the best one though. Welcoming PRs for this. |
@driesvints, this was a dirty quick solution to get it working again. I will dive deeper into the code and create a better approach. |
Any updates on this? I have the same problem. |
Can you all give me your PHP, Redis and Horizon versions where you're experiencing this problem? |
I believe I might have found the problem. It's probably the same problem as #123 so we might need to do this everywhere microtime is used. I'll send in a PR. |
PHP: 7.2.11 |
PHP 7.2.12 |
@driesvints this is still happening if you use
Maybe it's related to #788 . I'm not sure if is there anything to be fixed on the laravel end...But It works well with the old predis package. |
On both staging (centos) and local (ubuntu) environment I'm having issues with the timestamps.
This combined with experiencing issue #366 is giving me headaches.
The text was updated successfully, but these errors were encountered: