def get_events(command): borders = command.event,command.event+command.count limits = min(*borders),max(*borders)-1 blocks = [FLASHEVENT(event) for event in ServiceEvent.load(limits)] return SAnswer(blocks = blocks)
def get_last_event_no(command): last = ServiceEvent.load_last() if last == None: return event = FLASHEVENT(last) return SAnswer(blocks = [event])