cement.ext.ext_watchdog
Cement watchdog extension module.
Note This extension has an external dependency on watchdog
. Cement
explicitly does not include external dependencies for optional
extensions.
In Cement
>=3.0.8
you must includecement[watchdog]
in your applications dependencies.In Cement
<3.0.8
you must includewatchdog
in your applications dependencies.
- class cement.ext.ext_watchdog.WatchdogEventHandler(app, *args, **kw)[source]
Bases:
FileSystemEventHandler
Default event handler used by Cement, that logs all events to the application’s debug log. Additional
*args
and**kwargs
are passed to the parent class.- Parameters:
app – The application object
- class cement.ext.ext_watchdog.WatchdogManager(app, *args, **kw)[source]
Bases:
MetaMixin
The manager class that is attached to the application object via
App.extend()
.Usage:
with MyApp() as app: app.watchdog.start() app.watchdog.stop() app.watchdog.join()
- add(path, event_handler=None, recursive=True)[source]
Add a directory path and event handler to the observer.
- join(*args, **kw)[source]
Join the observer with the parent process. All
*args
and**kwargs
are passed down to the backend observer.