mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 04:38:42 +00:00
condense debug prints
This commit is contained in:
@@ -605,18 +605,20 @@ class LoadingSurvex:
|
|||||||
print(message, file=sys.stderr)
|
print(message, file=sys.stderr)
|
||||||
stash_data_issue(parser="survex", message=message)
|
stash_data_issue(parser="survex", message=message)
|
||||||
|
|
||||||
|
n = 0
|
||||||
for sb in chunk:
|
for sb in chunk:
|
||||||
got_obj, created = SurvexBlock.objects.get_or_create(
|
got_obj, created = SurvexBlock.objects.get_or_create(
|
||||||
_blockid=sb._blockid,
|
_blockid=sb._blockid,
|
||||||
)
|
)
|
||||||
if created:
|
if created:
|
||||||
print(f" - {sb} Created", file=sys.stderr)
|
n += 1
|
||||||
|
#print(f" - {sb} Created", file=sys.stderr)
|
||||||
else:
|
else:
|
||||||
# update the block if it changed
|
# update the block if it changed
|
||||||
got_obj._blockid = sb._blockid
|
got_obj._blockid = sb._blockid
|
||||||
got_obj.save()
|
got_obj.save()
|
||||||
# print(f" - {sb} SAVED", file=sys.stderr)
|
# print(f" - {sb} SAVED", file=sys.stderr)
|
||||||
print(f" - {len(chunk)} SBs saved to db", file=sys.stderr)
|
print(f" - {len(chunk)} SBs saved to db, {n} created", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
print(" - Success: Entire tree of survexblocks saved to db.", file=sys.stderr)
|
print(" - Success: Entire tree of survexblocks saved to db.", file=sys.stderr)
|
||||||
|
|||||||
Reference in New Issue
Block a user