Class Design for the Notification system from a system like Batch. I am building a workflow automation system in Python (Batch Job execution). It has features like sending notification on success/failure of batch command execution. Check examples below.
<job> name job1 <notify> type mail failure email@example.com </notify> <command> echo hello loki </command> </job>
def time_in_range(start, end, x): """Return true if x is in the range [start, end]""" if start <= end: return start <= x <= end else: return start <= x or x <= end <job> name job2 <notify> type mail <rule> condition time_in_range(datetime.time(13, 0, 0), datetime.time(1,0,0), datetime.currenttime()) true firstname.lastname@example.org false email@example.com </rule> </notify> <command> echo hello loki </command> </job>
Can you suggest some designs for the same? How do classes look like in its design, what holds what?