hawat.events module
This module contains couple of simple helpers for working with IDEA messages.
- hawat.events.db_get()[source]
Opens a new database connection if there is none yet for the current application context.
- Returns:
Database storage handler.
- Return type:
flask_sqlalchemy.SQLAlchemy
- hawat.events.db_settings(app)[source]
Return database settings from Mentat core configurations.
- Returns:
Database settings.
- Return type:
dict
- hawat.events.get_after_cleanup(dt: datetime) bool [source]
Returns True if there is the cleanup module present and the provied time comes before the latest cleanup time derived from the cleanup module configuration. Otherwise returns False.
Please note, that if the cleanup module is present, this function will return these values regardless of the running state of the module.