Sometimes you may be interested in an event taking place at a particular location during processing.
import pyblish.apidef on_published(context):has_error = any(result["error"] is not None for result in context.data["results"])print("Publishing %s" % ("failed" if has_error else "finished"))pyblish.api.register_callback("published", on_published)
This will cause
"Publishing finished" or
"Publishing failed" to be printed upon completed publishing, based on whether it completed successfully or not.
The arguments provided by the signal must match those in your callback. See here for a complete list of signals emitted in Pyblish.