A quick look at getting Backburner status information using MAXScript, based on the documentation in the MAXScript help file on NetRender (mainly the examples at the end of the page).
Make sure that a job is running before running the code (after the job ended before i finished tested i submitted a 10000 frame job of a box, no output file and task blocking not enabled, that kep it busy logn enough).
First we need to connect to the manager, take control (my assumption is that i'm the only one, if the Backburner monitor is running at the same time you'll get an error - so you may want to put some error checking in place) and lock access:
m=netrender.getmanager()
m.connect #manual "bbmanager"
m.getcontrol()
m.Lock true
Then we get a list of jobs and a list of servers (and we make sure that the job and server lists don't get updated whilst we get them):
m.SetUpdates false
j=m.getjobs()
s=m.getservers()
m.SetUpdates true
Then we loop through all servers and print the name and frame index of the current job it's working on (returns undefined if the server isn't working on a job)
for srv in s do
(
print srv.name
print srv.jobFrameIndex
)
And finally we disconnect:
m.disconnect()
If you want to get more info on jobs you could run this before you disconnect, note that on large jobs it takes a while to get this info!
for job in j do
(
l=job.GetLog()
print l
)
You can download the file here: backburner-status.zip
3 Comments
jona vark
Posted 9 February 2012 9:25 am
MaxStation
Posted 10 February 2012 3:22 am
if i call getservers() once with "m.SetUpdates true" instead of "m.SetUpdates false" from then on it does return the correct values, does that work for you?
jona vark
Posted 10 February 2012 8:58 am
Sweet! Let me try that as soon as I can.
I don't consider the status requests updates though.. how does that work?
I am almost overwhelmed to actually get some assistance with this. Thank you so much. I will report my results here so check back in a day or so if you can. ALso, if you get time.. make sure that it still works as I don't understand why these status requests have anything to do with updates.
Add Your Comment
You must be logged in to post a comment. Login here or Register