mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 02:07:42 +00:00
Merge branch '7314-fix-file-ingest-module-progress-reporting' into 7415-batch-save-files-in-file-ingest-pipeline
This commit is contained in:
commit
181de6a6ed
@ -770,23 +770,39 @@ public class IngestManager implements IngestProgressSnapshotProvider {
|
||||
|
||||
/**
|
||||
* Updates the ingest progress snapshot when a new ingest module starts
|
||||
* working on an ingest task.
|
||||
* working on a data source level ingest task.
|
||||
*
|
||||
* @param task The ingest task.
|
||||
* @param task The data source ingest task.
|
||||
* @param currentModuleName The display name of the currently processing
|
||||
* module.
|
||||
*/
|
||||
void setIngestTaskProgress(IngestTask task, String currentModuleName) {
|
||||
void setIngestTaskProgress(DataSourceIngestTask task, String currentModuleName) {
|
||||
IngestThreadActivitySnapshot prevSnap = ingestThreadActivitySnapshots.get(task.getThreadId());
|
||||
IngestThreadActivitySnapshot newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), currentModuleName, task.getDataSource());
|
||||
ingestThreadActivitySnapshots.put(task.getThreadId(), newSnap);
|
||||
|
||||
/*
|
||||
* Update the total run time for the PREVIOUS ingest module in the
|
||||
* pipeline, which has now finished its processing for the task.
|
||||
*/
|
||||
incrementModuleRunTime(prevSnap.getActivity(), newSnap.getStartTime().getTime() - prevSnap.getStartTime().getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the ingest progress snapshot when a new ingest module starts
|
||||
* working on a file ingest task.
|
||||
*
|
||||
* @param task The file ingest task.
|
||||
* @param currentModuleName The display name of the currently processing
|
||||
* module.
|
||||
*/
|
||||
void setIngestTaskProgress(FileIngestTask task, String currentModuleName) {
|
||||
IngestThreadActivitySnapshot prevSnap = ingestThreadActivitySnapshots.get(task.getThreadId());
|
||||
IngestThreadActivitySnapshot newSnap;
|
||||
if (task instanceof FileIngestTask) {
|
||||
try {
|
||||
newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), currentModuleName, task.getDataSource(), ((FileIngestTask)task).getFile());
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting file from file ingest task", ex);
|
||||
newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), currentModuleName, task.getDataSource());
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), currentModuleName, task.getDataSource(), task.getFile());
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error getting file from file ingest task", ex);
|
||||
newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), currentModuleName, task.getDataSource());
|
||||
}
|
||||
ingestThreadActivitySnapshots.put(task.getThreadId(), newSnap);
|
||||
@ -803,8 +819,7 @@ public class IngestManager implements IngestProgressSnapshotProvider {
|
||||
*
|
||||
* @param task The ingest task.
|
||||
*/
|
||||
void setIngestTaskProgressCompleted(IngestTask task
|
||||
) {
|
||||
void setIngestTaskProgressCompleted(IngestTask task) {
|
||||
IngestThreadActivitySnapshot prevSnap = ingestThreadActivitySnapshots.get(task.getThreadId());
|
||||
IngestThreadActivitySnapshot newSnap = new IngestThreadActivitySnapshot(task.getThreadId());
|
||||
ingestThreadActivitySnapshots.put(task.getThreadId(), newSnap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user