in my job I call the method with to2 parameter (int, instaapi)
that instaapi is instants of a class that contains some HTTP client,string,…
why hangfire converts each parameter to Jason ???
I don’t want to convert to JSON I want to send that parameter as it is.
I’m just starting with HangFire, however my understanding is the following:
You don’t need to send the parameters as Json.
Under the hood, HangFire will convert the parameters to a JSON so it can be stored on the database or on the implemented Queue.
If you are reading the parameters for querying purpose, then you can use Json.net to convert the JSON object to a dto based on your parameters to allow easier data manipulation.
Does this answer your question?
thanks for your answer, but my parameters is not serializable
so I just save it in cache and just for now problem solved
They have tobe serializable
Hangfire saves all jobs to the database and then jobservers retrieve the jobs.
So there is no possibility to use non serializable parameters.