Skip to content

feat: worker pinging - #2622

Draft
AlliBalliBaba wants to merge 6 commits into
mainfrom
feat/worker-pings
Draft

feat: worker pinging#2622
AlliBalliBaba wants to merge 6 commits into
mainfrom
feat/worker-pings

Conversation

@AlliBalliBaba

Copy link
Copy Markdown
Contributor

This PR is an idea I had to cover cases like #2467. It basically adds a way to send recurring messages to a worker via caddy config with relatively little code. This allows creating persistent schedulers, managing/cleaning up connections/caches and probably many other use cases.

# Caddyfile
worker /path/to/worker.php {
    ping overlap 1m "hello"
}
# /path/to/worker.php
while frankenphp_handle_request(function($message = '') {
    echo $message; # "hello"
})

I imagine this would also be possible as an extension, but it's more accessible here in core. Let me know what you think.

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.

1 participant