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
HQueue housekeeping
2751 2 2- atle
- Member
- 3 posts
- Joined: 9月 2009
- Offline
- rvinluan
- スタッフ
- 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
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
- atle
- Member
- 3 posts
- Joined: 9月 2009
- Offline
-
- Quick Links