[Closed] NetManager Interface issue
When I get the list of jobs, I don’t get the actual job names, just the interface for the job… what am I missing?
nm = NetRender.GetManager()
nm.connect #manual "left out intentionally"
nm.wantControl = true
nm.QueryControl #wait
nm.numJobs
nm.getjobs() --filter:#started
nm.disconnect()
Gives me this:
<MixinInterface:NetManager>
true
true
false
25
#(<MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, <MixinInterface:NetJob>, ...)
OK
Hi Jonah,
Each of the interfaces also has properties, like $.name
This snippet might help,
Josh.
--------------------------------------------------------------------------------
-- Get NetRender details
-- version 1.0
-- max version 6
-- written by Joshua Newman
-- josh@here.net.au
-- last updated 24/11/03
-- copyright 2003
--------------------------------------------------------------------------------
--
-- Get a list of jobs from the render manager
global nman,jobs,cams=#()
netaddress="myserver" -- the ip or name of your manager
fn connectman server=
(
nman=netrender.getmanager()
nman.connect #manual server
)
fn getjobs=
(
job=nman.getjobs()
return job
)
fn getservers=
(
svr=nman.getservers()
return svr
)
x=connectman netaddress
if x==true then
(
print "Connecting!"
jbs=getjobs()
for i=1 to jbs.count do format "Job : % - % -%
" i jbs[i].name jbs[i].state
svr= getservers()
for i=1 to svr.count do format "server % : %
" i svr[i].name
nman.disconnect()
)
else
(
print "Cannot connect."
)
Thanks Josh,
That is really helpful.
Maybe you can shed some light on another issue I’m having. We have two managers. I can get the jobs count and list for one, but the second one lists zero jobs. The server list prints for both but not the jobs… Same BB version on both. Ever seen something like this?
Why do you have 2 managers? Are all jobs the same bit platform (64-bit or 32-bit)?
-Eric
we are transitioning to a new server. all jobs are the same bit/OS. It’s something in the way BB is configured. Both same version of BB. Just hoping it rang a bell with someone.
no sorry, I don’t know anything about this. I’ve run multiple managers before, for whatever reason. The most obvious thing is to check that everything is using the same BB version.
J.