Skip to content
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

Job stuck on 'completed' without result #1

Open
leetm4n opened this issue Mar 13, 2018 · 0 comments
Open

Job stuck on 'completed' without result #1

leetm4n opened this issue Mar 13, 2018 · 0 comments

Comments

@leetm4n
Copy link

leetm4n commented Mar 13, 2018

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant