Should I use an async wrapper when calling the Hangfire BackgroundJob.Enqueue method?

Is it a good idea to put the Enqueue method in an async wrapper and have my API controller call it that way?

Which is better and why?


    public IActionResult AddLogs(List<Log> logs)
        BackgroundJob.Enqueue(() => DM.AddLogsBackground(logs));
        return Ok();


    public async Task<IActionResult> AddLogs(List<Log> logs)
        await DM.AddLogs(logs);
        return Ok();

    public async Task AddLogs(List<Log> logs)
        BackgroundJob.Enqueue(() => AddLogsBackground(logs));

The documentation says:

The Enqueue method does not call the target method immediately, it
runs the following steps instead:

  1. Serialize a method information and all its arguments.
  2. Create a new background job based on the serialized information.
  3. Save background job to a persistent storage.
  4. Enqueue background job to its queue.

There is no Async-version of BackgroundJob.Enqueue so not calling it synchronously doesn’t make much sense.

In theory, the underlying Storage-implementation could save the job asynchronously and that way expose the whole chain as a async operation but it isn’t like that at the moment.