AWS Thinkbox Discussion Forums

Task ID discrepancy

Have a problem here, could you guys please take a look asap? If i cant sort it within 10 mins, i will have to roll back.

When trying to compare the task IDs in the dependency list, i get different types of IDs. Some functions return indexes and some the proper unique IDs…

The main function gets passed the unique IDs:
def main(sJobID, vTaskIDs):
vTaskIDs looks like: [u’52543de52eb2af2e14127b33_0’, u’52543de52eb2af2e14127b33_1’, u’52543de52eb2af2e14127b33_2’, u’52543de52eb2af2e14127b33_3’, u’52543de52eb2af2e14127b33_4’]

But when i query a Task object’s TaskID parameter, i get something like 0,1,2,3,4…
vJobTasks = RepositoryUtils.GetJobTasks ( oJob, False )
for oTask in vJobTasks.TaskCollectionTasks:
ClientUtils.LogText("%s" % (oTask.TaskId))

gives me, 0,1,2,3 etc

Any ideas?

Is there any way to get a list of tasks from the job, that actually have the proper task ID?
Or based on the TaskID (the unique ID), get the task object?

Currently all our dependent jobs are sitting idle, and i see no way to fix this :\

Seems like the documentation is incorrect. There is the proper taskID property in the Task object, but its named ID, not TaskId.

Could you guys fix that?

That’s a bug. It should just be passing 0, 1, 2, etc.

As a workaround for now, you should be able to split the ID on ‘_’ and grab the string at index 1, which will line up properly with the TaskID parameter.

We’ll get this fixed for the next beta for sure.

The ID property is supposed to be for internal use only, so TaskId is correct in the documentation. I guess as a workaround, you could just compare it to the ID property for now, and change it to TaskId after we fix this bug in the next release.

What about the return value? Should it be [0,1,2,3] or [u’52543de52eb2af2e14127b33_0’, u’52543de52eb2af2e14127b33_1’, u’52543de52eb2af2e14127b33_2’, u’52543de52eb2af2e14127b33_3’, u’52543de52eb2af2e14127b33_4’] ?

You need to return the full IDs. That will change in the next beta as well so that you just need to return the [0,1,2,3,4] ids.

Privacy | Site terms | Cookie preferences