m-barthelemy / vapor-queues-fluent-driver

A Fluent implementation for https://github.com/vapor/queues (Vapor4)
MIT License
32 stars 16 forks source link

Fix JobModel Migration #23

Closed grahamburgsma closed 2 years ago

grahamburgsma commented 2 years ago

Pull request #22 forgot to update the migration. As is, all jobs will fail when using the default migration.

Error with Postgres: server: column "data" is of type bytea but expression is of type jsonb (transformAssignedExpr).

tonyarnold commented 2 years ago

I hit this today, too. @m-barthelemy, do you still have time to maintain this package?

m-barthelemy commented 2 years ago

I hit this today, too. @m-barthelemy, do you still have time to maintain this package?

@tonyarnold using Postgres or Mysql? Which version of this package?

tonyarnold commented 2 years ago

Postgres, with the latest release in this repo.

m-barthelemy commented 2 years ago

Postgres, with the latest release in this repo.

I'll try to take another look at the issue since I'd love to fix it for good and for both Postgres and Mysql. I might need a few days though.

m-barthelemy commented 2 years ago

Postgres, with the latest release in this repo.

@tonyarnold you mean 1.2.0, not master, right?

tonyarnold commented 2 years ago

No, I have been using the tagged version 2.0.0.

m-barthelemy commented 2 years ago

No, I have been using the tagged version 2.0.0.

Ouch. I should never have tagged this, since it broke Mysql.

@tonyarnold I'm working on feature/3.0.0-beta1 which contains completely breaking changes (as in, not possible to reuse your existing DB table for storing jobs), but which I hope will not have issues with the way Queues encodes the payload data. Also, no more JSON encoded stuff!

If you were willing to give it a try and report any issue, that would be super helpful and greatly appreciated!

tonyarnold commented 2 years ago

I can give it a go, for sure! I was coming from a much older Vapor 3.x app in this case, so I expected to have to run the older app until the original queue drained.

I would have loved to see JSON continue to be used, and to have stopped storing raw data in database fields so that we could easily inspect queued items, but so long as it all works 🤷🏻

m-barthelemy commented 2 years ago

@tonyarnold check the new jobs table structure, you might decide that you don't dislike it so much after all! It's a compromise that allows this driver to work with both Postgres and Mysql. When using json, what works with Postgres breaks Mysql.

grahamburgsma commented 2 years ago

Going to close this PR. @m-barthelemy maybe consider opening a discussion related to version 3?