-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Timer can only be used in workerman running environment #1084
Comments
Line 156 in a00e446
|
Yes I check the class, I found the Exception. PD: also checking the Timer use in Adapterman, I found a double session clean. That I need to fix. |
The timer can only be used in the Workerman runtime environment and cannot be used independently. |
When I said : don't show where is used the Timer, that create the error. Is that the Exception don't show where was used the Timer that create the error. |
It’s possible that you caught an exception but didn’t output the call stack. You can directly print the call stack information or log it in Timer.php. The code is similar to this: if (!Worker::getAllWorkers()) {
echo new \Exception('dump stack');
file_put_contents('/tmp/workerman_timer_dump', (string) new \Exception('dump stack'));
throw new RuntimeException('Timer can only be used in workerman running environment');
} |
I created a new branch for test with Workerman5, till I fixed. And new Adapterman v0.7 with all the changes in code and fixes for PHP8.4. ( I only tried if it was possible also with Workerman5) |
Testing Adapterman
And also don't show where is used the Timer, that create the error.
PD: Timer use in Adapterman
https://github.com/search?q=repo%3Ajoanhey%2FAdapterMan%20timer&type=code
The text was updated successfully, but these errors were encountered: