Finish Modules
Finish modules run after the last file in a package has ingested and the finish timeout elapses.
Note
Unlike action modules which execute one at a time, in order, finish modules all run simultaneously.
finish_shotgrid_delivery¶
Updates the Delivery for the ingested package with statuses and a summary of ingest.
If the Delivery doesn't exist in Shotgrid, it will still create it whether or not any items were processed or any versions were specifically added for this package.
finishers:
- module: finish_shotgrid_delivery
description: null
sg_delivery_entity: Delivery # (1)!
sg_name_field: title # (2)!
sg_versions_field: version_sg_deliveries_versions # (3)!
sg_summary_field: sg_contents # (4)!
sg_finished_status: recd # (5)!
sg_failure_status: err # (6)!
extra_data: # (7)!
shotgrid_field: value
- The Shotgrid entity to use for deliveries. Almost always
Delivery
-
The field to use for the delivery name.
Shotgrid default for Deliveries is
title
-
Optional: If set, all valid Shotgrid versions in this package will be linked to this field.
-
Optional: If set, a text summary of the package will be put onto the field.
Shotgrid default for Deliveries if
sg_contents
. See summaries. -
Optional: The Delivery status to set (unless there were failed items and sg_failure_status is set.)
-
Optional: The Delivery status to set if there were failed items.
We usually have to add this Shotgrid field manually.
-
Optional: A mapping of any additional
fields: values
to add to the Delivery. These can include template variables
Delivery Summaries¶
If sg_summary_field
is configured, Slingshot will set that field to a text summary of the files in the package.
Example
frame_check¶
cleanup¶
Deletes the package folder from the disk if it's empty.
While the action cleanup module will delete each processed item (i.e. received in a watchfolder), it will leave behind an empty package folder once all items are successfully processed. This finsher module cleans up that last remaining folder.
It can also remove hidden and temp files (like .DS_store) that might be remaining.
finishers:
- module: cleanup
description: delete empty package from watchfolder
delete_package_folder_if_empty_from: /Volumes/VFX/_slingshot_in # (1)!
delete_additional_package_files: [.DS_Store] # (2)!
-
The base path in which to search for the package_name folder.
This should usually match the path of the watchfolder.
You can use regex-parsed template variables here, e.g.
${vendor}
-
Any additional files to delete if they still exist.
Used to cleanup hidden or temporary non-package files that can be safely deleted.