-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Description
I am experiencing an issue when passing large int64 arguments to a job. I try passing 3889108265204450030 for example, and end up receiving 3889108265204450000.
After looking into it, I think this is caused by using the default json decoder when unmarshaling a job (I believe it's here: https://github.com/contribsys/faktory/blob/main/client/client.go#L345). In order to keep precision on int64, it would have to be something like this instead:
var job Job
decoder := json.NewDecoder(bytes.NewBuffer(data))
decoder.UseNumber()
decoder.Decode(&job)
Is this a change you would be interested in? I plan to work around this by encoding and decoding it myself and passing faktory a string, but it might be a helpful thing to add.
I am using Faktory v1.6.0 with faktory_worker_go.
rj-lee, TheRedPanda17 and jeremyd85
Metadata
Metadata
Assignees
Labels
No labels