Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Context: Helper function to get entities #967

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Oct 23, 2024

Changelog Description

Create context has helper functions to collect and cache entities.

Additional info

The need came with ynput/ayon-deadline#49 . That PR is fetching entities on each instance change which slows down the whole logic a lot. This way the entities are cached on CreateContext which avoids unnecessary re-fetching of the same data. The PR needed specifically task type, but I guess there will come soon more that will want to use attributes etc.

The methods are using folder path and task name for filtering as that is what instances have available in data.

The same methods are not used for context validation and to get current context entities.

Testing notes:

  1. All should be ok when publisher UI is opened in any host.
  2. Validation of context should still happen without any issues.
  3. Invalid context on existing instance should be properly displayed as invalid.
  4. It is possible to use new helper methods to get corresponding entities.

@ynbot ynbot added type: enhancement Improvement of existing functionality or minor addition size/S labels Oct 23, 2024
@iLLiCiTiT iLLiCiTiT self-assigned this Oct 23, 2024
@iLLiCiTiT iLLiCiTiT changed the title Create Context: Helper function to get instance task type Create Context: Helper function to get entities Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants