From: "Mr. Daniel Browne" <dbrowne@(email surpressed)> Subject: Render Log Paths Date: Fri, 16 Dec 2011 16:13:27 -0500 |
Msg# 2158 View Complete Thread (2 articles) | All Threads Last Next |
Hi Greg, Is it possible to establish the log directory within the render portion of a rush script? I'm trying to set up for Nuke jobs to generate separate log dirs per job ID, but of course the job ID isn't assigned until you run the "rush -submit" command. I wasn't sure if the log directory had to be settled on before you issue a submit, so I thought I'd ask. -Dan |
From: Greg Ercolano <erco@(email surpressed)> Subject: Re: Render Log Paths Date: Fri, 16 Dec 2011 16:33:20 -0500 |
Msg# 2159 View Complete Thread (2 articles) | All Threads Last Next |
On 12/16/11 13:13, Mr. Daniel Browne wrote: > Is it possible to establish the log directory within the render portion = > of a rush script? I'm trying to set up for Nuke jobs to generate = > separate log dirs per job ID, but of course the job ID isn't assigned = > until you run the "rush -submit" command. I wasn't sure if the log = > directory had to be settled on before you issue a submit, so I thought = > I'd ask. Hi Dan, There's two common ways of doing this: 1) Use the '%s' suffix on the "logdir" command during submit, and that will be expanded to be the jobid on submit, and rush will create the dir for you. Details here: http://www.seriss.com/rush-current/rush/rush-submit-cmds.html#LogDir - OR - 2) Submit the job in the /pause/ state, get the jobid, create the dir, assign the job the new logdir with "rush -logdir" and then unpause the job with "rush -cont" #1 is probably the best approach, and certainly easiest. So for instance: rush -submit << EOF .. logdir /some/path/%s .. EOF ..assuming the directory "/some/path/" exists, rush will expand the %s to the jobid, and then run a mkdir() command to create the subdir before the job actually starts running. The logic for this %s expansion and mkdir() is all in the rush core, not the submit scripts. So what you can do is in the MAIN_Submit() section of the script, you can modify the code that determines the "LogDir" default (which is normally to create it based on the scene filename) and use your own path with the '%s' added instead. Warning: jobids are recycled, so they aren't guaranteed to be unique once a job is dumped. The other way to do it would be to submit the job in the paused state, eg: rush -submit << EOF .. state pause .. EOF .. that get your jobid after it submits while the job is paused, do your directory creation logic with the jobid in the submit script, change the logdir with 'rush -logdir /new/path/whatever', then use 'rush -cont <JOBID>' to kick the job running. I think the %s technique is easier though.. but depends on what you want in your directory logic. -- Greg Ercolano, erco@(email surpressed) Seriss Corporation Rush Render Queue, http://seriss.com/rush/ Tel: (Tel# suppressed)ext.23 Fax: (Tel# suppressed) Cel: (Tel# suppressed) |