We recently implemented HQueue in our pipeline and can now render from a variety of programs, not just Houdini. Works like a charm!
My question is this; is there a way to hook into HQueue and have a python snippet run whenever a job is deleted (by the user or automatically). What I would like to do is some housekeeping; ie delete temporary files etc.
At the moment, there is no way to add a hook for when a job is deleted in HQueue.
Though there does exist a couple of other job hooks, onSuccess and onError, which are run when a job succeeds or fails respectively. They are not documented, but are exposed for users. They work like the ‘command’ job property where the value is just a shell script snippet.
Here's a job spec example with onSuccess and onError hooks:
Excellent! I'd rather have it on delete since we might want to re-render stuff or do adjustments, but this is better than nothing while we wait for onDelete.