node-rethinkdb-job-queue icon indicating copy to clipboard operation
node-rethinkdb-job-queue copied to clipboard

Add queue version to backing table

Open TomKaltz opened this issue 8 years ago • 4 comments
trafficstars

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 avatar Sep 06 '17 02:09 TomKaltz

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.

grantcarthew avatar Sep 06 '17 03:09 grantcarthew

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.

TomKaltz avatar Sep 06 '17 04:09 TomKaltz

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 avatar Sep 06 '17 11:09 grantcarthew

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

TomKaltz avatar Sep 06 '17 13:09 TomKaltz