Author Topic: setting up environment before rendering starts  (Read 2325 times)

bijuramavfx

  • Sr. Member
  • ****
  • Posts: 40
setting up environment before rendering starts
« on: August 03, 2012, 07:51:31 PM »
Hi there:

How can I set an environment before worker starts an application to render...? How and where  can I set/call the environment variable setting file before launching a job ..?

thanks
/Biju

joshua.bretag

  • Full Member
  • ***
  • Posts: 10
Re: setting up environment before rendering starts
« Reply #1 on: August 06, 2012, 06:36:14 AM »
To export the submission environment you can use the job flag export_environment in the job flag field

I hope this helps

Cheers
Josh

bijuramavfx

  • Sr. Member
  • ****
  • Posts: 40
Re: setting up environment before rendering starts
« Reply #2 on: August 06, 2012, 01:04:26 PM »
Hello Josh:
Would it be possbile to send a sample code to do so. We have currently two environments, the old and the new one and we are in the process of migrating to new one. Once the environment is identified we would to grab all the environment varables and populate the job.

Thanks
/Biju

bijuramavfx

  • Sr. Member
  • ****
  • Posts: 40
Re: setting up environment before rendering starts
« Reply #3 on: August 09, 2012, 06:48:07 PM »
Hello Josh:

The following get all the environment variables.. but I would like to set only few environment variables - is there a way to do so ..?

qb.submit(qb.Job({'prototype':'cmdline', 'package':{'cmdline':'set'}, 'flagsstring':'export_environment'}))

Thanks
/Biju

bijuramavfx

  • Sr. Member
  • ****
  • Posts: 40
Re: setting up environment before rendering starts
« Reply #4 on: August 09, 2012, 07:47:55 PM »
Hi there:

In simplecmd.py file, how do I set the value for the following job.env on the fly
 
detailedqube_options.add_option( 'job.env'  , 'dict', 'Environment variable overrides when running job', widget=Grid_Dict, default={}, label='Env Vars', widget_vsize=200, rows=10)

Thanks
/Biju