Verified Commit 632e97ac authored by Dmitry Volodin's avatar Dmitry Volodin
Browse files

Fix

parent e2ce94f2
Pipeline #21861 passed with stages
in 15 minutes and 43 seconds
......@@ -25,8 +25,9 @@ def iter_ids_batch():
.sort("_id")
.limit(BATCH_SIZE)
)
# for d in cursor:
yield [d["_id"] for d in cursor]
d = {}
for d in cursor:
yield d["_id"]
if match and match["_id"]["$gt"] == d["_id"]:
break
match = {"_id": {"$gt": d["_id"]}}
......@@ -39,8 +40,8 @@ def fix():
i += 1
if i < 20:
continue
for l in Link.objects.filter(id__in=ids).timeout(False):
for link in Link.objects.filter(id__in=ids).timeout(False):
try:
l.save()
link.save()
except AssertionError:
print("Assertion Error, check link with id: %s" % l.id)
print("Assertion Error, check link with id: %s" % link.id)
......@@ -171,7 +171,7 @@ class PathAPI(NBIAPI):
error = str(e)
dt = perf_counter() - t0
if error:
return 404, {"status": False, "error": e, "time": dt}
return 404, {"status": False, "error": error, "time": dt}
return 200, {"status": True, "paths": paths, "time": dt}
def get_object_and_interface(self, object=None, interface=None, service=None):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment