Conditions | 7 |
Total Lines | 32 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 16 |
CRAP Score | 7.1929 |
Changes | 0 |
1 | 1 | from cleo.helpers import argument |
|
15 | def handle(self) -> int: |
||
16 | """ |
||
17 | 1 | Executes constants command when StratumCommand is activated. |
|
18 | """ |
||
19 | 1 | self._read_config_file() |
|
20 | |||
21 | 1 | factory = self._create_backend_factory() |
|
22 | 1 | ||
23 | 1 | worker = factory.create_constant_worker(self._config, self._io) |
|
24 | if worker: |
||
25 | 1 | ret = worker.execute() |
|
26 | |||
27 | if ret != 0: |
||
28 | 1 | return ret |
|
29 | 1 | ||
30 | 1 | worker = factory.create_routine_loader_worker(self._config, self._io) |
|
31 | if worker: |
||
32 | 1 | ret = worker.execute() |
|
33 | |||
34 | if ret != 0: |
||
35 | 1 | return ret |
|
36 | 1 | ||
37 | 1 | worker = factory.create_routine_wrapper_generator_worker(self._config, self._io) |
|
38 | if worker: |
||
39 | 1 | ret = worker.execute() |
|
40 | |||
41 | if ret != 0: |
||
42 | 1 | return ret |
|
43 | |||
44 | 1 | self._io.write('') |
|
45 | |||
46 | return 0 |
||
47 | |||
49 |