From reading the docs, I see that using the jobs.RunCommandAsync will not persist the job to the database. I have a use case where I need to debug a problem that doesn’t occur for almost 30 days and being able to persist commands to the database would give me more insight as to what the issue is. Is there maybe a setting somewhere where I can force it to persist a command?
The entire purpose of RunCommandAsync
is to avoid persistence and have the request executed in memory by the assigned worker where the execution result is asynchronously propagated back to the callee, this can’t happen for persisted jobs which are deserialized and executed by an isolated thread without any reference back to the callee thread which initiated the job.
If you want persistence you’d use jobs.EnqueueCommand
instead.
1 Like