Fix bug 1446: NS ends in state BUILDING 50/10350/1
authorlloretgalleg <illoret@indra.es>
Fri, 19 Feb 2021 12:06:52 +0000 (12:06 +0000)
committerlloretgalleg <illoret@indra.es>
Fri, 19 Feb 2021 12:06:52 +0000 (12:06 +0000)
Change-Id: Ideb6f0ac72637aca78d1b8906581409e153c4c7d
Signed-off-by: lloretgalleg <illoret@indra.es>
NG-RO/osm_ng_ro/ns_thread.py

index 2efdbc0..94af5a1 100644 (file)
@@ -1758,6 +1758,11 @@ class NsWorker(threading.Thread):
                                     next_check_at = min(
                                         next_check_at, dependency_ro_task["to_check_at"]
                                     )
+                                    # must allow dependent task to be processed first
+                                    # to do this set time after last_task_processed
+                                    next_check_at = max(
+                                        self.time_last_task_processed, next_check_at
+                                    )
                                     break
                                 elif dependency_task["status"] == "FAILED":
                                     error_text = "Cannot {} {} because depends on failed {} {} id={}): {}".format(