Fix bug 1598 to update the time to refresh the status of CREATE task
Change-Id: I350e0e8cbfb7818dcd26ffcb23799c16ff8282a2
Signed-off-by: gallardo <sgallardor@indra.es>
diff --git a/NG-RO/osm_ng_ro/ns_thread.py b/NG-RO/osm_ng_ro/ns_thread.py
index ee62af4..dbd9fe6 100644
--- a/NG-RO/osm_ng_ro/ns_thread.py
+++ b/NG-RO/osm_ng_ro/ns_thread.py
@@ -1874,6 +1874,11 @@
task["item"]
].refresh(ro_task)
_update_refresh(new_status)
+ else:
+ # The refresh is updated to avoid set the value of "refresh_at" to
+ # default value (next_check_at = now + (24 * 60 * 60)) when status is BUILD,
+ # because it can happen that in this case the task is never processed
+ _update_refresh(task["status"])
except Exception as e:
new_status = "FAILED"