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

Jobs should move to failure if anything in library can't understand the posted job #7

Open
aultac opened this issue May 12, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@aultac
Copy link
Member

aultac commented May 12, 2020

If I post a job to a queue that doesn't match the schema, oada-jobs throws but the job never fails and is also not delivered to the service. If oada-jobs own internal code throws for any reason (like a malformed job resource) while handling a job object, it should fail the job overall and move to jobs-failure just as if the service threw on the job.

@abalmos
Copy link
Member

abalmos commented May 12, 2020

I see what you mean. I'll add this to my todo list of later.

It's not clear to me that is a "failed" job ... rather it is simply a bug in the program that produced the job. Moving it to jobs-success and/or jobs-failure just breaks the formats there.

I could see one of two things:

  1. A jobs-invalid list that has no formats defined and is really a programer debugging tool.
  2. Just delete the invalid job(s) and rely on logs to tell you want happened -- the actual job resource would still be there and @oada/jobs could make a best effort attempt to fill in a results key with some sort of error.

I vote for 2

@abalmos abalmos self-assigned this May 12, 2020
@abalmos abalmos added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels May 12, 2020
@aultac
Copy link
Member Author

aultac commented May 12, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants