| Total Complexity | 9 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | from synergine.lib.process.processmanager import PipePackage as BasePipePackage |
||
| 4 | class PipePackage(BasePipePackage): |
||
| 5 | """ |
||
| 6 | Object used to send data to process |
||
| 7 | """ |
||
| 8 | |||
| 9 | def __init__(self): |
||
| 10 | super().__init__() |
||
| 11 | self._mechanisms = [] |
||
| 12 | self._step_key = 0 |
||
| 13 | self._context = None |
||
| 14 | |||
| 15 | def set_context(self, context): |
||
| 16 | self._context = context |
||
| 17 | |||
| 18 | def get_context(self): |
||
| 19 | return self._context |
||
| 20 | |||
| 21 | def set_step_key(self, step_key): |
||
| 22 | self._step_key = step_key |
||
| 23 | |||
| 24 | def get_step_key(self): |
||
| 25 | return self._step_key |
||
| 26 | |||
| 27 | def set_mechanisms(self, mechanisms): |
||
| 28 | self._mechanisms = mechanisms |
||
| 29 | |||
| 30 | def get_mechanisms(self): |
||
| 31 | return self._mechanisms |
||
| 32 | |||
| 33 | def setCurrentProcessId(self, process_id): |
||
| 34 | super().setCurrentProcessId(process_id) |
||
| 35 | self._context.set_current_chunk_position(process_id) |
||
| 36 | |||
| 37 | def setCountProcess(self, count): |
||
| 38 | super().setCountProcess(count) |
||
| 39 | self._context.set_total_chunk(count) |