some updates

This commit is contained in:
Greg DiCristofaro 2023-07-27 20:22:22 -04:00
parent dc9c212db5
commit ce1c57dc79

View File

@ -558,16 +558,16 @@ public class MalwareScanIngestModule implements FileIngestModule {
} else if (ingestJobState.getIngestJobContext().fileIngestIsCancelled()) {
return Collections.emptyList();
}
// while we have a valid auth token, also check file uploads.
if (ingestJobState.isUploadUnknownFiles()) {
long remainingUploads = remaining(authTokenResponse.getFileUploadLimit(), authTokenResponse.getHashLookupCount());
long remainingUploads = remaining(authTokenResponse.getFileUploadLimit(), authTokenResponse.getFileUploadCount());
if (remainingUploads <= 0) {
ingestJobState.disableUploadUnknownFiles();
notifyWarning(
Bundle.MalwareScanIngestModule_uploadFile_noRemainingFileUploads_title(),
Bundle.MalwareScanIngestModule_uploadFile_noRemainingFileUploads_desc(),
null);
Bundle.MalwareScanIngestModule_uploadFile_noRemainingFileUploads_title(),
Bundle.MalwareScanIngestModule_uploadFile_noRemainingFileUploads_desc(),
null);
}
}
@ -683,7 +683,10 @@ public class MalwareScanIngestModule implements FileIngestModule {
"MalwareScanIngestModule_longPollForNotFound_timeout_title=File Upload Results Timeout",
"MalwareScanIngestModule_longPollForNotFound_timeout_desc=There was a timeout while waiting for file uploads to be processed. Please try again later.",})
private void longPollForNotFound(IngestJobState ingestJobState) throws InterruptedException, CTCloudException, Blackboard.BlackboardException, TskCoreException {
if (!ingestJobState.isDoFileLookups() || !ingestJobState.isQueryForMissing() || MapUtils.isEmpty(ingestJobState.getUnidentifiedHashes())) {
if (!ingestJobState.isDoFileLookups()
|| !ingestJobState.isQueryForMissing()
|| MapUtils.isEmpty(ingestJobState.getUnidentifiedHashes())
|| ingestJobState.getIngestJobContext().fileIngestIsCancelled()) {
return;
}