Skip to content

Job stuck on 'completed' without result #1

@leetm4n

Description

@leetm4n

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions