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

Task stuck due to "Error: Reflect task args: test is not xxx" #56

Closed
niedbalski opened this issue Jan 4, 2016 · 0 comments
Closed

Task stuck due to "Error: Reflect task args: test is not xxx" #56

niedbalski opened this issue Jan 4, 2016 · 0 comments

Comments

@niedbalski
Copy link
Contributor

If a task argument value of incorrect type is passed, the tasksignature.Get method get stuck waiting
for a result.

Example client:

    signatures.TaskArg{
            Type:  "int64",
            Value: "this-is-a-string",
    },

    asyncResult, err := server.SendTask(&task)
    if err != nil {
        fmt.Println(err)
    }

    result, err := asyncResult.Get()

The worker displays the following error:

2016/01/04 16:18:47 Failed processing task_488a2edb-433b-4fda-a4eb-d5a59568f3a3. Error = this-is-a-string is not int64
2016/01/04 16:18:47 Going to retry launching the worker. Error: Reflect task args: this-is-a-string is not int64

I think would be better to set the task state to failed, and return the error.

niedbalski pushed a commit to niedbalski/machinery that referenced this issue Jan 4, 2016
the task as failed and return the error. Fixes RichardKnop#56.

Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant