mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge pull request #2284 from pypeclub/bugfix/OP-2041_Alternate-site-for-Site-Sync-doesnt-work-for-sequences
Alternate site for site sync doesnt work for sequences
This commit is contained in:
commit
c1d8245ff2
2 changed files with 7 additions and 2 deletions
|
|
@ -421,7 +421,8 @@ class SFTPHandler(AbstractProvider):
|
|||
|
||||
try:
|
||||
return pysftp.Connection(**conn_params)
|
||||
except paramiko.ssh_exception.SSHException:
|
||||
except (paramiko.ssh_exception.SSHException,
|
||||
pysftp.exceptions.ConnectionException):
|
||||
log.warning("Couldn't connect", exc_info=True)
|
||||
|
||||
def _mark_progress(self, collection, file, representation, server, site,
|
||||
|
|
|
|||
|
|
@ -1574,6 +1574,7 @@ class SyncServerModule(OpenPypeModule, ITrayModule):
|
|||
|
||||
Use 'force' to remove existing or raises ValueError
|
||||
"""
|
||||
reseted_existing = False
|
||||
for repre_file in representation.pop().get("files"):
|
||||
if file_id and file_id != repre_file["_id"]:
|
||||
continue
|
||||
|
|
@ -1584,12 +1585,15 @@ class SyncServerModule(OpenPypeModule, ITrayModule):
|
|||
self._reset_site_for_file(collection, query,
|
||||
elem, repre_file["_id"],
|
||||
site_name)
|
||||
return
|
||||
reseted_existing = True
|
||||
else:
|
||||
msg = "Site {} already present".format(site_name)
|
||||
log.info(msg)
|
||||
raise ValueError(msg)
|
||||
|
||||
if reseted_existing:
|
||||
return
|
||||
|
||||
if not file_id:
|
||||
update = {
|
||||
"$push": {"files.$[].sites": elem}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue