-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api.task.get_task_by_id(taskid) return object does not include "endTime" #77
Comments
Hi @ragadegithub That's API performance, since endTime only comes when it is really done That's why later when you checked in postman it was already there because it had time to finish. |
Bryan,
I think, my observation is that the endTime never was available in the
output from the SDK even after the task was completed.
Let me re-test that and share with you the results where the loop continues
as it never found the endTime attribute.
Regards,
Rakesh
…On Tue, Jan 10, 2023 at 3:50 PM Bryan Vargas ***@***.***> wrote:
Hi @ragadegithub <https://github.com/ragadegithub>
dnacentersdk already supports it, what I think happened is that when you
performed get_task_by_id it was not finished yet, that's why it didn't come
endTime.
That's API performance, since endTime only comes when it is really done
That's why later when you checked in postman it was already there because
it had time to finish.
—
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFTMLRIBLDP7GRA3KGUT2LLWRXDSRANCNFSM6AAAAAATV2MWZI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This issue can be closed. endTime is On a scale setup the reponse.progress will have the 'fileId' field well before the endTime is published. Increase the "Wait time to fix the issue in script than sdk. |
Prerequisites
Describe the bug
api.task.get_task_by_id(taskid) return object must include "endTime" when the task has completed.
presence of the "endTime" key in the response data signifies the completion of the task and hence is very useful for executing conditional loops to check task status.
Below is the response for obtained for a completed task using the SDK (api.task.get_task_by_id(taskid))
{
'version': 1667597378807,
'startTime': 1667597377102,
'progress': '{"fileId":"f4b356e7-d132-4eab-811a-bbad2001d08f"}',
'username': 'admin',
'serviceType': 'Command Runner Service',
'lastUpdate': 1667597378807,
'isError': False,
'instanceTenantId': '6334ab5f519bd86f3b93a4ee',
'id': '2eee4e7c-93b7-41c0-9c8f-de71e171d546'
}
Output from POSTMAN for the same task
}
Expected behavior
Expected return object:
{
'version': 1667597378807,
'startTime': 1667597377102,
"endTime": 1667597382798,
'progress': '{"fileId":"f4b356e7-d132-4eab-811a-bbad2001d08f"}',
'username': 'admin',
'serviceType': 'Command Runner Service',
'lastUpdate': 1667597378807,
'isError': False,
'instanceTenantId': '6334ab5f519bd86f3b93a4ee',
'id': '2eee4e7c-93b7-41c0-9c8f-de71e171d546'
}
Screenshots
Please provide an screenshot of the successful API call with cuRL, Postman, etc.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: