Virus Scanning - Retry on error
As a student, I want to ensure my uploaded files are scanned as soon as possible. While adding the uploaded files to be scanned, if the virus scan server is unavailable or a true or false response is not given, the queue needs to retry the operation after a few minutes.
Technical
-
[x] Ensure that a scanned file returning something different than
trueorfalsewill be retried later. The assumption is that even when the virus server is down the only response received will be anundefined, which means that a new attempt when the server is back may work. -
[x] Investigate on what is returned during a virus scan failed and check if there is difference between null and undefined in the response and a way to capture the error thrown.
-
[x] Update the
virus-scanqueue configuration as below (suggested 12 attempts every 30min).
{
"retry": 12,
"cleanUpPeriod": 604800000,
"retryInterval": 900000,
"dashboardReadonly": false
}
- [x] Add E2E Test(s) to ensure that exception is thrown when the scanning process does not complete.
Additional technical context
- [x] Remove the NotFound exception as it is not related to HTTP.
- [x] Make sure that error is thrown.