hypejunction / hypeshutdown
Flushes the buffer after the response is sent allowing shutdown to continue in the background
Installs: 15
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Type:elgg-plugin
pkg:composer/hypejunction/hypeshutdown
Requires
- php: >=7.0
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2020-02-15 14:17:19 UTC
README
API to offset code execution until system shutdown. Allows plugins to execute expensive code until after the page has been rendered in the browser.
Usage
All shutdown event handlers will be executed after the request has been sent to the browser and the buffer has been flushed.
You can either register a shutdown event handler:
elgg_register_event_handler('shutdown', 'system', function() { // your long running script });
You can also use a runtime queue:
\hypeJunction\Shutdown\Queue::instance()->queue(function() use ($video) { $video->convert(); });