| Total Complexity | 2 | 
| Total Lines | 53 | 
| Duplicated Lines | 0 % | 
| Coverage | 0% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | """ | ||
| 11 | class JobFinishedMessage(Message): | ||
| 12 | """ | ||
| 13 | Message type for informing the controller that a job has finished. | ||
| 14 | """ | ||
| 15 | MESSAGE_TYPE = 'controller:JobFinishedMessage' | ||
| 16 | """ | ||
| 17 | The message type. | ||
| 18 | |||
| 19 | :type: str | ||
| 20 | """ | ||
| 21 | |||
| 22 | # ------------------------------------------------------------------------------------------------------------------ | ||
| 23 | def __init__(self, sch_id, rnd_id, exit_status): | ||
| 24 | """ | ||
| 25 | Object constructor. | ||
| 26 | |||
| 27 | :param int sch_id: The ID of the schedule of the job. | ||
| 28 | :param int rnd_id: The ID of the job. | ||
| 29 | :param int exit_status: The exit status of the job. | ||
| 30 | """ | ||
| 31 | Message.__init__(self, JobFinishedMessage.MESSAGE_TYPE) | ||
| 32 | |||
| 33 | self.sch_id = sch_id | ||
| 34 | """ | ||
| 35 | The ID of the schedule of the job. | ||
| 36 | |||
| 37 | :type: int | ||
| 38 | """ | ||
| 39 | |||
| 40 | self.rnd_id = rnd_id | ||
| 41 | """ | ||
| 42 | The ID of the job. | ||
| 43 | |||
| 44 | :type: int | ||
| 45 | """ | ||
| 46 | |||
| 47 | self.exit_status = exit_status | ||
| 48 | """ | ||
| 49 | The exit status of the job. | ||
| 50 | |||
| 51 | :type: int | ||
| 52 | """ | ||
| 53 | |||
| 54 | # ------------------------------------------------------------------------------------------------------------------ | ||
| 55 | def send_message(self, end_point): | ||
| 56 | """ | ||
| 57 | Sends the message to an end point. | ||
| 58 | |||
| 59 | :param str end_point: The end point. | ||
| 60 | |||
| 61 | :rtype: None | ||
| 62 | """ | ||
| 63 | self.message_controller.send_message(end_point, self) | ||
| 64 | |||
| 66 |