golemfactory / task-api

GNU General Public License v3.0
6 stars 2 forks source link

App lifecycle handler #33

Closed mfranciszkiewicz closed 5 years ago

mfranciszkiewicz commented 5 years ago

The main responsibility of the AppLifecycleHandler class is to enable custom code execution before/after AppServer._server startup/shutdown. This pins the potential points of execution of the following:

The AppLifecycleHandler is currently a stub of a planned default implementation responsible for thread management (indirectly).

Additionally, AppLifecycleHandler objects:

Wiezzel commented 5 years ago

@Krigpl Any comments? Can we merge this?

Krigpl commented 5 years ago

I just wonder whether having a separate class here instead of providing empty methods directly in the handler has any added value. I imagine that usually some resources will be used both by the main handler and the lifecycle handler and things may get awkward. But otherwise ok.

Wiezzel commented 5 years ago

@mfranciszkiewicz Plz bump to v0.15.0 because I already released 0.14.0 with the shutdown change.