File indexing completed on 2026-04-11 08:41:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 """
0011 Hooks for EventService.
0012 """
0013
0014
0015 class ESHook:
0016 def get_payload(self):
0017 """
0018 Get payload to execute.
0019
0020 :returns: dict {'payload': <cmd string>, 'output_file': <filename or without it>, 'error_file': <filename or without it>}
0021 """
0022 raise Exception("Not Implemented")
0023
0024 def get_event_ranges(self, num_ranges=1):
0025 """
0026 Get event ranges.
0027
0028 :param num_ranges: Number of event ranges to download, default is 1.
0029 :returns: dict of event ranges.
0030 None if no available events.
0031 """
0032 raise Exception("Not Implemented")
0033
0034 def handle_out_message(self, message):
0035 """
0036 Handle ES output or error message.
0037
0038 :param message: a dict of parsed message.
0039 For 'finished' event ranges, it's {'id': <id>, 'status': 'finished', 'output': <output>, 'cpu': <cpu>,
0040 'wall': <wall>, 'message': <full message>}.
0041 Fro 'failed' event ranges, it's {'id': <id>, 'status': 'finished', 'message': <full message>}.
0042 """
0043 raise Exception("Not Implemented")