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

Add queue version to backing table #78

Open
TomKaltz opened this issue Sep 6, 2017 · 4 comments
Open

Add queue version to backing table #78

TomKaltz opened this issue Sep 6, 2017 · 4 comments

Comments

@TomKaltz
Copy link

TomKaltz commented Sep 6, 2017

So I was testing reanimating and then canceling a terminated job. I reanimated a job, it gets updated correctly and goes to waiting status. Then if I try to cancel the job the update query blows up because it doesn't have the processCount field on the row.

Error: RethinkDB returned an error at getResultError

first_error: 'No attribute `processCount` in object...

This table might be from an older version of RJQ. Is this a bug or should I try this on a fresher queue table?

@TomKaltz TomKaltz changed the title missing fields from previous queue versions causing db errors cancelJob: missing fields from queue row causing db errors Sep 6, 2017
@TomKaltz TomKaltz changed the title cancelJob: missing fields from queue row causing db errors cancelJob: missing field from queue row causing db error Sep 6, 2017
@grantcarthew
Copy link
Owner

What's the version of the package Tom? I haven't done any work in that area of the product for a long time so it is probably a bug.

Can you please get a copy of the jobs properties and values at the different stages?

  • Terminated properties
  • Reanimated properties

Thanks mate.

@TomKaltz
Copy link
Author

TomKaltz commented Sep 6, 2017

I must have been using a data table written by a version from last year. I've updated RJQ, cleared the table and added new jobs and cannot reproduce the problem.

@grantcarthew
Copy link
Owner

Oh, that's good. I had not thought about table versions though. There should be a version written to the table so upgrades can take place. The state document seems like a good choice for that.

@grantcarthew grantcarthew changed the title cancelJob: missing field from queue row causing db error Add queue version to backing table Sep 6, 2017
@TomKaltz
Copy link
Author

TomKaltz commented Sep 6, 2017

A DB upgrade/migration mechanism would be a killer feature. Perhaps just give warning on mismatched table versions for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants