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.
I am experiencing an issue when passing large int64 arguments to a job. I try passing
3889108265204450030for example, and end up receiving3889108265204450000.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:
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.