Module notify.notifications
Defines the UserNotification class used by Notifier to build messages
Classes
class ErrorNotification (facility: str, function_name: str, error_type: str = 'Unknown', error_message: str = 'Unknown', traceback: str = 'Unknown', concerned_roles: Sequence[SubscriptionType] = ('Developer',))-
A collection of fields describing an error notification.
Class variables
var concerned_roles : Sequence[SubscriptionType]var error_message : strvar error_type : strvar facility : strvar function_name : strvar traceback : str
Static methods
def from_exc_info(facility: str, function_name: str, exc_info: None | ErrInfo = None, mock: bool = False) ‑> ErrorNotification-
returns a new UserNotification instance using the data from the job(s)
class UserNotification (facility: str, concerned_roles: Sequence[SubscriptionType], date_of_service: str, event_description: str | EventType, batch_id: int, batch_state: str, case_id: int, case_state: str, case_state_reason: str, created_batch_id: int = -9999, created_case_id: int = -9999)-
A collection of fields describing a user event notification.
Use the
from_jobclass method to create a notification from directly from job(s) as returned by dbops.job_library / as constructed from PDFs in the final TableTransformer output.Class variables
var batch_id : intvar batch_state : strvar case_id : intvar case_state : strvar case_state_reason : strvar concerned_roles : Sequence[SubscriptionType]var created_batch_id : intvar created_case_id : intvar date_of_service : strvar event_description : str | EventTypevar facility : str
Static methods
def from_job(roles: Sequence[SubscriptionType], event_type: str | EventType, job: dict[str, Any], to_case_state: str = '', to_case_state_reason: str = '', created_batch_id: int = -9999, mock: bool = False) ‑> UserNotification-
returns a new UserNotification instance using the data from the job(s)