HQueue housekeeping

   2749   2   2
User Avatar
Member
3 posts
Joined: 9月 2009
Offline
Hi,

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.

Cheers!
-atle
Stripe AS
Oslo, Norway
User Avatar
スタッフ
1283 posts
Joined: 7月 2005
Offline
Hi atle,

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:

{
“name” : “My Job”,
“command” : “echo ‘Hello World’”,
“onSuccess” : “python myOnSuccessScript.py”,
“onError” : “python myOnErrorScript.py”
}


I submitted an RFE (#49414) so that a similar onDelete script is added to HQueue.

Cheers,
Rob
User Avatar
Member
3 posts
Joined: 9月 2009
Offline
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.

Thanks!
Stripe AS
Oslo, Norway
  • Quick Links