mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #7835 from gdicristofaro/AUT-2458-messaging
2458 long polling messaging
This commit is contained in:
commit
11441c9382
@ -700,6 +700,7 @@ class MalwareScanIngestModule implements FileIngestModule {
|
|||||||
Bundle.MalwareScanIngestModule_longPollForNotFound_fileLookupPolling_title(),
|
Bundle.MalwareScanIngestModule_longPollForNotFound_fileLookupPolling_title(),
|
||||||
Bundle.MalwareScanIngestModule_longPollForNotFound_fileLookupPolling_desc()
|
Bundle.MalwareScanIngestModule_longPollForNotFound_fileLookupPolling_desc()
|
||||||
);
|
);
|
||||||
|
logger.log(Level.INFO, "Begin polling for malware status of file uploads.");
|
||||||
|
|
||||||
Map<String, List<Long>> remaining = new HashMap<>(ingestJobState.getUnidentifiedHashes());
|
Map<String, List<Long>> remaining = new HashMap<>(ingestJobState.getUnidentifiedHashes());
|
||||||
|
|
||||||
@ -735,6 +736,9 @@ class MalwareScanIngestModule implements FileIngestModule {
|
|||||||
|
|
||||||
// exponential backoff before trying again
|
// exponential backoff before trying again
|
||||||
long waitMultiplier = ((long) Math.pow(2, retry));
|
long waitMultiplier = ((long) Math.pow(2, retry));
|
||||||
|
|
||||||
|
logger.log(Level.INFO, MessageFormat.format("Waiting {0} milliseconds before polling again for malware status of file uploads.", (waitMultiplier * FILE_UPLOAD_RETRY_SLEEP_MILLIS)));
|
||||||
|
|
||||||
for (int i = 0; i < waitMultiplier; i++) {
|
for (int i = 0; i < waitMultiplier; i++) {
|
||||||
if (!ingestJobState.isDoFileLookups() || ingestJobState.getIngestJobContext().fileIngestIsCancelled()) {
|
if (!ingestJobState.isDoFileLookups() || ingestJobState.getIngestJobContext().fileIngestIsCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user