Atomic background jobs

queues
Tags: #<Tag:0x00007f69fd4703d8>

#1

Hey, i’m trying to create 1-n pdf(s) upon user request, which should be archived into the document management system - now i want to give the user a httpstatuscode.accepted to acknowledge that i got the request.

Beforehand i want to send the request into a queue in hangfire - can i simply queue the pdf creation job and “ContinueWith” the archivating?

Can i also requeue the archivating part, if the DMS is currently down/non responsive?

My current approach is to create the file and commiting it to the document server, but this approach isn’t fail safe for when the file hasn’t been accepted by the DMS for whatever reason. So now i’m intending to either just kill the file from the file system and redo the whole process, or to split up the process to make it easier to continue. Does my intended approach work?