Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

[QUAD] Kitsu Sync: Properly synchronize project state between OP mongo and Kitsu #6322

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

BenSouchet
Copy link

Changelog Description

Paragraphs contain detailed information on the changes made to the product or service, providing an in-depth description of the updates and enhancements. They can be used to explain the reasoning behind the changes, or to highlight the importance of the new features. Paragraphs can often include links to further information or support documentation.

Additional info

Paragraphs of text giving context of additional technical information or code examples.

Testing notes:

  1. start with this step
  2. follow this step

@ynbot ynbot added size/XS Denotes a PR changes 0-99 lines, ignoring general files module: Kitsu Kitsu integration type: enhancement Enhancements to existing functionality labels Sep 11, 2024
# The project doesn't exist on OpenPype DB, skip
return

# Deactivate the project on the OpenPype DB (if not already), then return
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

# Get the project from OpenPype DB
project_name = project["name"]
project_dict = get_project(project_name)
project_active_state_kitsu = KitsuStateToBool[project["project_status_name"]]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

@@ -400,8 +425,15 @@
# all project
project_to_sync = all_projects

# Iterate over MongoDB projects and if it's not present in Kitsu, deactivate it on MongoDB
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (94 > 79 characters)

"data": project['data']
}
}
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line missing indentation or outdented

bulk_writes.append(
UpdateOne(
{"_id": project["_id"]},
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line missing indentation or outdented

dbcon.Session["AVALON_PROJECT"] = project["name"]
bulk_writes.append(
UpdateOne(
{"_id": project["_id"]},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line missing indentation or outdented

project['data']['active'] = active
dbcon.Session["AVALON_PROJECT"] = project["name"]
bulk_writes.append(
UpdateOne(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line over-indented for hanging indent

@@ -356,6 +361,23 @@
)


def update_project_state_in_db(dbcon: AvalonMongoDB, project: dict, active: bool):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
module: Kitsu Kitsu integration size/XS Denotes a PR changes 0-99 lines, ignoring general files type: enhancement Enhancements to existing functionality
Projects
Status: Pending Review
Development

Successfully merging this pull request may close these issues.

2 participants