Announcement

Collapse
No announcement yet.

Feature request: vray supersede argument

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Feature request: vray supersede argument

    Hi,

    It would be awesome if vray.exe (or vray.bin) could be started with an argument (such as --supersede), which would close any already running DR servers/slaves. This would cause the new server to always be able to start but first wait for the already running slave to drain and exit.

    What do you think about that?
    Best Regards,
    Fredrik

  • #2
    It is not impossible, certainly, but you should be able to script this quite easily no? If you want to just kill the other running copy right away, that is.

    Best regards,
    Vlada
    I only act like I know everything, Rogers.

    Comment


    • #3
      Yes, I guess it's kind of easy to script yourself around it. However, I am currently killing processes rather than quitting them (nicely). Not sure if it matters much or if it could pose a problem?

      This is what I do currently, in python:

      Code:
      	if(sys.platform == 'win32'):
      		killCommand = "TASKKILL /F /IM \"vray.exe\""
      		os.system(killCommand)
      		killCommand = "TASKKILL /F /IM \"vrayspawner.exe\""
      		os.system(killCommand)
      	elif('linux' in sys.platform):
      		killpid = None
      		pgrepCmd = ['pgrep', 'vray.bin']
      		proc = subprocess.Popen( pgrepCmd, stdout=subprocess.PIPE )
      		for line in iter(proc.stdout.readline, b''):
      			sys.stdout.flush()
      			killpid = line.rstrip()
      			try:
      				#os.system('kill ' + str(killpid))
      				os.kill(int(killpid), signal.SIGKILL)
      			except:
      				print 'Unable to kill already running instance of vray.'
      I am not sure if I am killing all instances of vray this way, maybe I need to loop through the pgrep output in Linux more thoroughly. Would you advise me to kill vray.exe/vray.bin in any other way than described here?
      Best Regards,
      Fredrik

      Comment

      Working...
      X