-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Issue
Currently whenever one Extractor fails with an error the remaining Extractors will still start processing, even though Integration will still be skipped since it's checking explicitly inside the Integrator whether that have been any errors, and if so... it disallows the integration into the pipeline.
The problem with this is that the first Extractor could fail and even other long running Extractors will still try to continue, even though we know it will be useless anyway.
Solution
For example:
import pyblish.logic
import pyblish.api
def custom_test(**vars):
# Keep default behavior
default_result = pyblish.logic.default_test(**vars)
if default_result:
return default_result
# Add custom behavior
# Fail on anything after validation having an error.
after_validation = pyblish.api.ValidatorOrder + 0.5
if any(order >= after_validation for order
in vars["ordersWithErrors"]):
return "failed after validation"
pyblish.api.register_test(custom_test)Note this would have the downside that also Cleanup would not get triggered, as such the local disk (staging dir) might get a filled up temporary folder. This could be an additional problem that might need to be taken care of...
Another workaround could be to have our Extractors also initially check whether any errors have occurred, and if so... to raise an Error themselves, yet have the Cleanup plug-in always run.