AWS Thinkbox Discussion Forums

What's the scripting variable to retrieve the version of Deadline a worker is running?

Hi,

What’s the variable/class to use when seeking the version of Deadline a Worker is running? I’m looking for the equivalent of what the column ‘Version’ contains in the stock Workers pane in the UI.

I’ve searched the docs and the forum posts, I think my keywords are tough b/c I couldn’t find this.

Thanks,

Jason

Hi Jason,

The scripting documentation only shows functions for getting the major version, and the major.minor version of Deadline. You can execute ClientUtils.GetDeadlineVersion() within a client script to get the latter:

    ClientUtils.GetDeadlineVersion()
    --> 10.1

However, the deadlinecommand CLI lets you get the whole string, so you could just execute it with the -GetVersion argument, and use the string value it returns, for example:

    ClientUtils.ExecuteCommandAndGetOutput("-GetVersion")
    --> v10.1.9.2 Release (3d6a64d94)

Thanks Bobo!

I’m using this in conjunction with a Worker reporting script, where I am iterating over a list of Workers to produce diagnostics for each Worker. In that context, what would be a way to use ClientUtils functions?

Best regards,

Jason

The RepositoryUtils.GetSlaveInfo() function returns a SlaveInfo object which has an undocumented .Version property that represents what you see in the Version column in the Workers panel. So if you will be running your script within the Monitor (as opposed to using the stand-alone Python scripting API outside of Deadline), then you could say

allSettings = RepositoryUtils.GetSlaveSettingsList(False)
for aSlave in allSettings:
    aSlaveInfo = RepositoryUtils.GetSlaveInfo(aSlave.SlaveName, False)
    print "============================================================"
    print (aSlave.SlaveName)
    print (aSlaveInfo.SlaveState)
    print ("Version: %s \n" % (aSlaveInfo.Version))
print "============================================================"

On an ancient installation of Deadline on one of my machines where two workers were Offline and the local one was still active, it printed to the Monitor’s Console window:

2021-02-09 15:15:34:  PYTHON: ============================================================
2021-02-09 15:15:34:  PYTHON: DESKTOP-4E76V9C
2021-02-09 15:15:34:  PYTHON: Idle
2021-02-09 15:15:34:  PYTHON: Version: v10.1.9.2 Release (3d6a64d94) 
2021-02-09 15:15:34:  PYTHON: ============================================================
2021-02-09 15:15:34:  PYTHON: DESKTOP-4E76V9C-DBR
2021-02-09 15:15:34:  PYTHON: Offline
2021-02-09 15:15:34:  PYTHON: Version: v10.1.9.2 Release (3d6a64d94) 
2021-02-09 15:15:34:  PYTHON: ============================================================
2021-02-09 15:15:34:  PYTHON: EC2AMAZ-7A66SVB
2021-02-09 15:15:34:  PYTHON: Offline
2021-02-09 15:15:34:  PYTHON: Version: v10.1.9.2 Release (3d6a64d94) 
2021-02-09 15:15:34:  PYTHON: ============================================================

Since Slaves.GetSlaveInfos() is also available in the external scripting API, it would be possible to write the same outside of the Monitor scripts.

I hope this helps.

Hi Bobo,

Fantastic. That is a great help.

Best,

Jason

Privacy | Site terms | Cookie preferences