Skip to content
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

Add the ability to run periodic tasks #16

Merged
merged 2 commits into from
Nov 15, 2020

Conversation

chrisharrison
Copy link
Contributor

When running websockets on Heroku, the connections are subject to a timeout:

https://devcenter.heroku.com/articles/websockets#timeouts

The solution is to periodically send messages over the connection to keep it alive.

Usage:

$app = new SomeContainer();

$server = new Server(...);
$server->registerApplication('name', ...);
$server->addTimer(30000, function () use ($app) {
    $app->doSomething();
});
$server->run();

@nekudo nekudo changed the base branch from master to release/2.1.0 November 15, 2020 10:37
@nekudo nekudo merged commit 1567309 into bloatless:release/2.1.0 Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants