Avoid race condition between transaction in storeModelSolution and background job
We have a similar issue as in #32 (closed), but this time it's for the storage of the model solution.
We should only schedule the background job after the transaction has gone through. Incidentally, we should also only send the event in processSubmission when the transaction has gone through.