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: valuesto 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¶
Checks that all expected frames are present for each version in the package that is linked to a Shot and has sg_path_to_frames set.
finishers:
- module: frame_check
description: check all shot versions have expected frames
# frame_types: [ shot_exr ] # (1)!
sg_frame_in_field: sg_frame_range_in # (2)!
sg_frame_out_field: sg_frame_range_out # (3)!
sg_check_field: sg_frame_check_passed # (4)!
sg_check_results_field: sg_frame_check_error # (5)!
service: local # (6)!
-
Deprecated: The types of frames to check.
This option is deprecated. We now frame check all versions in a package that are linked to a Shot and have
sg_path_to_framesset.In the future, we may add back support for other entities (like Assets) if there is demand for it.
-
The Shotgrid Shot field that contains the expected first frame number.
- The Shotgrid Shot field that contains the expected last frame number.
- The Shotgrid Version field to set to True/False if the frame check passed or failed.
- The Shotgrid Version field to set to a text description of any frame check errors.
-
The filesystem to use to check for frames.
Valid options:
local,s3,maxlo,aspera_files
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.
