-
Notifications
You must be signed in to change notification settings - Fork 43
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
Cosmetics + minor optimization for CleanUp
plugin
#1086
base: develop
Are you sure you want to change the base?
Conversation
- Use `PublishError` instead of assertion - Optimize the 'check for errors' - Optimize the product type check + log debug message when skipped due to that - Move imports to top
@@ -71,10 +72,12 @@ def process(self, instance): | |||
self.log.debug("Cleaning renders new...") | |||
self.clean_renders(instance, skip_cleanup_filepaths) | |||
|
|||
if [ef for ef in self.exclude_families | |||
if instance.data["productType"] in ef]: | |||
product_type = instance.data["productType"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh lord, this plugin...
This condition should probably happen before error checks. And we should change exclude_families
to exclude_product_types
.
I don't know why there was "str in str" check instead of "str == str"? I guess that is question for @jakubjezek001 who might be able to tell if there are product types that should be skipped too and contain "clip
"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh lord, this plugin...
Thank for sharing my feelings 🙉 🙈 🙊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember it anymore.. Its been reeeealy old code. But there could be case, or rather used to be, where render in nuke was render.local, render.farm and so on..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it should be safe to replace with explicit product type check...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it should be safe to replace with explicit product type check...?
I am just guessing but it might be a solution.
Changelog Description
PublishError
instead of assertionclip
yet the product type of the instance wasshotclip
orclippy
orclip.audio
because it'd check if the string was IN the product type, it didn't check for exact match (which it does now)Additional info
n/a
Testing notes: