Conditions | 6 |
Total Lines | 25 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 6.0852 |
Changes | 0 |
1 | 1 | import sys |
|
33 | 1 | 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 | 1 | try: |
|
40 | 1 | while self.running: |
|
41 | 1 | p = self.queue.get() |
|
42 | 1 | self.queue.task_done() |
|
43 | |||
44 | 1 | for q in self.destinations: |
|
45 | 1 | q.put(p) |
|
46 | |||
47 | 1 | if 'TERM' in str(p): |
|
48 | 1 | printM('Exiting.', self.sender) |
|
49 | 1 | break |
|
50 | |||
51 | 1 | if self.testing: |
|
52 | 1 | TEST['x_masterqueue'][1] = True |
|
53 | |||
54 | except Exception as e: |
||
55 | return e |
||
56 | |||
57 | sys.exit() |
||
58 |