mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
formatting changes
This commit is contained in:
parent
7f4d33ee57
commit
9225c3553d
1 changed files with 16 additions and 14 deletions
|
|
@ -739,13 +739,13 @@ class SyncToAvalonEvent(BaseEvent):
|
||||||
time_cleanup = time_7 - time_6
|
time_cleanup = time_7 - time_6
|
||||||
time_task_updates = time_8 - time_7
|
time_task_updates = time_8 - time_7
|
||||||
time_total = time_8 - time_1
|
time_total = time_8 - time_1
|
||||||
self.log.debug(
|
self.log.debug((
|
||||||
"Process time: {:.2f} <{:.2f}, {:.2f}, {:.2f}, ".format(
|
"Process time: {:.2f} <{:.2f}, {:.2f}, {:.2f}, "
|
||||||
time_total, time_removed, time_renamed, time_added) +
|
"{:.2f}, {:.2f}, {:.2f}, {:.2f}>"
|
||||||
"{:.2f}, {:.2f}, {:.2f}, {:.2f}>".format(
|
).format(
|
||||||
time_moved, time_updated, time_cleanup, time_task_updates
|
time_total, time_removed, time_renamed, time_added,
|
||||||
)
|
time_moved, time_updated, time_cleanup, time_task_updates
|
||||||
)
|
))
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
msg = "An error has happened during synchronization"
|
msg = "An error has happened during synchronization"
|
||||||
|
|
@ -2242,8 +2242,10 @@ class SyncToAvalonEvent(BaseEvent):
|
||||||
continue
|
continue
|
||||||
ftrack_mongo_mapping_found[ftrack_id] = avalon_entity["_id"]
|
ftrack_mongo_mapping_found[ftrack_id] = avalon_entity["_id"]
|
||||||
|
|
||||||
self._update_avalon_tasks(ftrack_mongo_mapping_found,
|
self._update_avalon_tasks(
|
||||||
tasks_per_ftrack_id)
|
ftrack_mongo_mapping_found,
|
||||||
|
tasks_per_ftrack_id
|
||||||
|
)
|
||||||
|
|
||||||
def update_entities(self):
|
def update_entities(self):
|
||||||
"""
|
"""
|
||||||
|
|
@ -2441,8 +2443,9 @@ class SyncToAvalonEvent(BaseEvent):
|
||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _update_avalon_tasks(self, ftrack_mongo_mapping_found,
|
def _update_avalon_tasks(
|
||||||
tasks_per_ftrack_id):
|
self, ftrack_mongo_mapping_found, tasks_per_ftrack_id
|
||||||
|
):
|
||||||
"""
|
"""
|
||||||
Prepare new "tasks" content for existing records in Avalon.
|
Prepare new "tasks" content for existing records in Avalon.
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -2460,10 +2463,9 @@ class SyncToAvalonEvent(BaseEvent):
|
||||||
change_data = {"$set": {}}
|
change_data = {"$set": {}}
|
||||||
change_data["$set"]["data.tasks"] = tasks_per_ftrack_id[ftrack_id]
|
change_data["$set"]["data.tasks"] = tasks_per_ftrack_id[ftrack_id]
|
||||||
mongo_changes_bulk.append(UpdateOne(filter, change_data))
|
mongo_changes_bulk.append(UpdateOne(filter, change_data))
|
||||||
if not mongo_changes_bulk:
|
|
||||||
return
|
|
||||||
|
|
||||||
self.dbcon.bulk_write(mongo_changes_bulk)
|
if mongo_changes_bulk:
|
||||||
|
self.dbcon.bulk_write(mongo_changes_bulk)
|
||||||
|
|
||||||
def _mongo_id_configuration(
|
def _mongo_id_configuration(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue