-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Line 236 in 30d95be
| return &Job{ |
Your API supports caching of images already analysed, if a recognition on an image has been run before, the POST call will instantly return the result, not just in two steps. The struct created here will omit 'name' and 'skipReason', but it can already be present if the scenario mentioned above happens. Therefore when updateJob is called it won't update the job, because it only does when status is not 'completed'. This would result in a job forever being 'completed' and never having actual result 'name'.
Workaround:
job, _ := cloudSightClient.RemoteImageRequest(imageUrl, params)
job.Status = cloudsight.StatusNotCompleted // Set the state to 'notCompleted'
cloudSightClient.WaitJob(job, 20*time.Second)Metadata
Metadata
Assignees
Labels
No labels