You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
Hi,
I am working on integrating the Swoole Timer and making the schedule ran by it instead of cron. Actually this part is done (but probably the scheduler should be expanded to handle intervals more frequent than a minute) and I am willing to release the source code.
However, I had less success with websockets. First of all, am I correct that only one swoole websocket server is being created?
It's quite tricky to bind a swoole timer, I had found out that the swoole.start events are the only suitable places. If I listen to the swoole.start event, I cannot access the websocket facade, like it had not been initialized at all. Obviously, If I choose the swoole.workerStart event, I will create multiple timers as this code gets executed upon each worker creation. There could be a hacky solution to make sure only one timer is created with the latter event, but if only one websocket server is running, there must be a way to access it from the manager process. Can you help me out with this one?
The text was updated successfully, but these errors were encountered:
Hi,
I am working on integrating the Swoole Timer and making the schedule ran by it instead of cron. Actually this part is done (but probably the scheduler should be expanded to handle intervals more frequent than a minute) and I am willing to release the source code.
However, I had less success with websockets. First of all, am I correct that only one swoole websocket server is being created?
It's quite tricky to bind a swoole timer, I had found out that the swoole.start events are the only suitable places. If I listen to the swoole.start event, I cannot access the websocket facade, like it had not been initialized at all. Obviously, If I choose the swoole.workerStart event, I will create multiple timers as this code gets executed upon each worker creation. There could be a hacky solution to make sure only one timer is created with the latter event, but if only one websocket server is running, there must be a way to access it from the manager process. Can you help me out with this one?
The text was updated successfully, but these errors were encountered: