|
|
@@ -94,6 +94,16 @@ const submit = async () => {
|
|
|
// SSE will update its status to ready when it'll be.
|
|
|
await em.fetch(File, receipt.fileId)
|
|
|
|
|
|
+ // In the case of a SSE dysfonctionnement, program a forced checkup of file status
|
|
|
+ for (let i = 0; i < 3; i++) {
|
|
|
+ setTimeout(async () => {
|
|
|
+ if (file.value && file.value.status === 'PENDING') {
|
|
|
+ console.warn("File's status has not been updated : force a status checkup")
|
|
|
+ await em.fetch(File, receipt.fileId, true)
|
|
|
+ }
|
|
|
+ }, i * 4000)
|
|
|
+ }
|
|
|
+
|
|
|
} finally {
|
|
|
submitting.value = false
|
|
|
}
|