Conditions | 6 |
Total Lines | 25 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import sys |
||
33 | def run(self): |
||
34 | """ |
||
35 | Distributes queue objects to execute various other tasks: for example, |
||
36 | it may be used to populate ObsPy streams for various things like |
||
37 | plotting, alert triggers, and ground motion calculation. |
||
38 | """ |
||
39 | try: |
||
40 | while self.running: |
||
41 | p = self.queue.get() |
||
42 | self.queue.task_done() |
||
43 | |||
44 | for q in self.destinations: |
||
45 | q.put(p) |
||
46 | |||
47 | if 'TERM' in str(p): |
||
48 | printM('Exiting.', self.sender) |
||
49 | break |
||
50 | |||
51 | if self.testing: |
||
52 | TEST['x_masterqueue'][1] = True |
||
53 | |||
54 | except Exception as e: |
||
55 | return e |
||
56 | |||
57 | sys.exit() |
||
58 |