Commit dd07dc59d3a0ed9df1accdae868798d1bcfe2d4f
1 parent
ea36dc1d
Exists in
dev
Add loadseq for test dev
Showing
1 changed file
with
16 additions
and
2 deletions
Show diff stats
src/core/pyros_django/observation_manager/AgentImagesProcessor.py
... | ... | @@ -37,7 +37,8 @@ class AgentImagesProcessor(Agent): |
37 | 37 | # TODO: Redefine valid timeout |
38 | 38 | _AGENT_SPECIFIC_COMMANDS = { |
39 | 39 | # Format : “cmd_name” : (timeout, exec_mode) |
40 | - | |
40 | + | |
41 | + "do_create_loadseq_1" : (60, Agent.EXEC_MODE.SEQUENTIAL, ''), | |
41 | 42 | "do_create_test_images_1" : (60, Agent.EXEC_MODE.SEQUENTIAL, ''), |
42 | 43 | "do_create_test_images_2" : (60, Agent.EXEC_MODE.SEQUENTIAL, ''), |
43 | 44 | "do_stop_current_processing" : (60, Agent.EXEC_MODE.SEQUENTIAL, ''), |
... | ... | @@ -48,7 +49,7 @@ class AgentImagesProcessor(Agent): |
48 | 49 | # AgentCmd.CMD_STATUS_CODE.CMD_EXECUTED |
49 | 50 | _TEST_COMMANDS_LIST = [ |
50 | 51 | # Format : ("self cmd_name cmd_args", timeout, "expected_result", expected_status), |
51 | - (True, "self do_create_test_images_1", 200, '', Agent.CMD_STATUS.CMD_EXECUTED), | |
52 | + (True, "self do_create_loadseq_1", 200, '', Agent.CMD_STATUS.CMD_EXECUTED), | |
52 | 53 | (True, "self do_stop asap", 500, "STOPPING", Agent.CMD_STATUS.CMD_EXECUTED), |
53 | 54 | ] |
54 | 55 | |
... | ... | @@ -129,6 +130,9 @@ class AgentImagesProcessor(Agent): |
129 | 130 | def do_stop_current_processing(self): |
130 | 131 | pass |
131 | 132 | |
133 | + def do_create_loadseq_1(self): | |
134 | + self._create_loadseq_1() | |
135 | + | |
132 | 136 | def do_create_test_images_1(self): |
133 | 137 | self._create_test_images_1() |
134 | 138 | |
... | ... | @@ -276,6 +280,16 @@ class AgentImagesProcessor(Agent): |
276 | 280 | Internal methods |
277 | 281 | ================================================================= |
278 | 282 | """ |
283 | + def _create_test_loadseq_1(self): | |
284 | + try: | |
285 | + # === Define an image to test the processing and copy it in incoming directory | |
286 | + self._file_ima_test = os.path.join(self._path_data_root,"vendor/guitastro/tests/data/m57.fit") | |
287 | + file_in = self._file_ima_test | |
288 | + file_out = f"{self._paths['ima_incoming']}/m57.fit" | |
289 | + shutil.copyfile(file_in, file_out) | |
290 | + self._filename_manager.naming("") | |
291 | + except: | |
292 | + raise | |
279 | 293 | |
280 | 294 | def _create_test_images_1(self): |
281 | 295 | try: | ... | ... |