background task execution is incompatible with windows
Just posting this so we don't forget.
At the moment PDFs are processed using multiprocessing
. We only explicitly pass in
a single piece of information to the processing function (the PDF ID in the database)
and we implicitly get the rest of the necessary information (various paths, plus the
bound Database
instance) via the fact that on Unix the default way to spawn subprocesses
is to use fork
.
We cannot rely on this on windows, as there we only have spawn
. This means that we need to
explicitly pass in the rest of the necessary information to the PDF processing function,
and it needs to do things like bind the Database
instance when it starts.
This will only really be a problem when we aim to target windows for people to run single-person deployments.