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
Is there an easy way to run background job (blocking or non-blocking is fine; maybe use fiber;) similar to ActiveJob in Rails? I understand it may not fit what mruby-shelf does, but it does provide some convenience. For example, a way to insert a middleware which will be called every 1 second or so. The simplehttpserver seems able to run in non-blocking mode, but I don't see how it works with mruby-shelf in non-blocking mode.
One use case that a mruby application periodically reads values from sensors (temperature, humidity, etc.) and provides a web interface for user. It keeps records of measurements for every second. Users can use web browser to get these records occasionally.
Hi @rguiscard I see your use case but where's the connection between background jobs and mruby-shelf? The external webserver needs to listen in non-blocking mode, some background job can collect data independent of the lifecycle of the webserver and whenever a user requests comes in, the webserver will call the rack app to get the response.
Activity
katzer commentedon Apr 30, 2024
Hi @rguiscard I see your use case but where's the connection between background jobs and mruby-shelf? The external webserver needs to listen in non-blocking mode, some background job can collect data independent of the lifecycle of the webserver and whenever a user requests comes in, the webserver will call the rack app to get the response.