m-barthelemy / vapor-queues-fluent-driver

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

Error decoding JobData when dequeuing job #21

Closed bottlehall closed 2 years ago

bottlehall commented 2 years ago

JobModel's data property is Data, but the JobData instance is encoded as a JSON array. On decoding, this causes an error saying Data expected but Array found.

In JobModel.swift:

  1. Change the data property's type to JobData on line 42.
  2. Change the assignment on line 62 to self.data = data.

In FluentQueue.swift:

  1. Change line 21 to return job.data.
m-barthelemy commented 2 years ago

Hi, thanks for the report. Looks similar to #20

I haven't had any time to look into it but will do (hopefully) very soon. But if you feel like making a PR please go ahead!

bottlehall commented 2 years ago

Created PR.

m-barthelemy commented 2 years ago

Thanks a lot for the PR! Released https://github.com/m-barthelemy/vapor-queues-fluent-driver/releases/tag/2.0.0

bottlehall commented 2 years ago

Any chance of getting this implemented into the default release? I've just built a new system from scratch and had to go in and put the changes in by hand yet again!

m-barthelemy commented 2 years ago

My latest investigations (a few of months ago) showed that:

Do you confirm that you are experiencing this issue when using Mysql?

bottlehall commented 2 years ago

Yes. I only use MySQL.

Sent from my iPhone

On 6 Aug 2022, at 09:54, Matthieu Barthélemy @.***> wrote:

 My latest investigations (a few of months ago) showed that:

I can reproduce the issue with Mysql I cannot reproduce the issue with Postgres if I remember correctly, the fix you proposed broke with Postgres Do you confirm that you are experiencing this issue when using Mysql?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

m-barthelemy commented 2 years ago

Should (hopefully) be fixed in 3.0.0-beta1

Feel free to reopen an issue if you're still having trouble with the new releases.