mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 16:42:27 +00:00
Batch changes
Changes in support of batch processing
This commit is contained in:
parent
30fbc6d290
commit
fff36a904b
@ -876,16 +876,30 @@ public class FolderInputSystem extends FileInputSystem implements PamSettings, D
|
|||||||
* processing will continue from there.
|
* processing will continue from there.
|
||||||
*/
|
*/
|
||||||
if (allFiles == null || allFiles.size() == 0) {
|
if (allFiles == null || allFiles.size() == 0) {
|
||||||
|
System.out.println("Daq setanal start time: no files to check against");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
System.out.printf("setAnalysisStarttTime: checking %d files for start time of %s\n", allFiles.size(), PamCalendar.formatDBDateTime(startTime));
|
||||||
|
/*
|
||||||
|
* If the starttime is maxint then there is nothing to do, but we do need to set the file index
|
||||||
|
* correctly to not over confuse the batch processing system.
|
||||||
|
*/
|
||||||
|
long lastFileTime = getFileStartTime(allFiles.get(allFiles.size()-1).getAbsoluteFile());
|
||||||
|
if (startTime > lastFileTime) {
|
||||||
|
currentFile = allFiles.size();
|
||||||
|
System.out.println("Folder Acquisition processing is complete and no files require processing");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
for (int i = 0; i < allFiles.size(); i++) {
|
for (int i = 0; i < allFiles.size(); i++) {
|
||||||
long fileStart = getFileStartTime(allFiles.get(i).getAbsoluteFile());
|
long fileStart = getFileStartTime(allFiles.get(i).getAbsoluteFile());
|
||||||
if (fileStart >= startTime) {
|
if (fileStart >= startTime) {
|
||||||
currentFile = i;
|
currentFile = i;
|
||||||
PamCalendar.setSoundFile(true);
|
PamCalendar.setSoundFile(true);
|
||||||
|
if (startTime > 0) {
|
||||||
PamCalendar.setSessionStartTime(startTime);
|
PamCalendar.setSessionStartTime(startTime);
|
||||||
System.out.printf("Sound Acquisition start processing at file %s time %s\n", allFiles.get(i).getName(),
|
System.out.printf("Sound Acquisition start processing at file %s time %s\n", allFiles.get(i).getName(),
|
||||||
PamCalendar.formatDBDateTime(fileStart));
|
PamCalendar.formatDBDateTime(fileStart));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,10 @@ public class ExitCommand extends ExtCommand {
|
|||||||
public String execute(String command) {
|
public String execute(String command) {
|
||||||
PamController.getInstance().pamStop();
|
PamController.getInstance().pamStop();
|
||||||
PamSettingManager.getInstance().saveFinalSettings();
|
PamSettingManager.getInstance().saveFinalSettings();
|
||||||
System.exit(0);
|
PamController pamController = PamController.getInstance();
|
||||||
|
pamController.pamClose();
|
||||||
|
// shut down the JavaFX thread and the JVM
|
||||||
|
pamController.shutDownPamguard();
|
||||||
return getName();
|
return getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,12 +55,18 @@ public class ReprocessManager {
|
|||||||
// need to decide what to do based on the list of possible choices.
|
// need to decide what to do based on the list of possible choices.
|
||||||
ReprocessStoreChoice choice = chosePartStoreAction(choiceSummary);
|
ReprocessStoreChoice choice = chosePartStoreAction(choiceSummary);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Need to call this even though we aren't reprocessing so that
|
||||||
|
* the Folderinput stream reports correctly on how many files have
|
||||||
|
* been processed.
|
||||||
|
*/
|
||||||
|
boolean setupOK = setupInputStream(choiceSummary, choice);
|
||||||
|
|
||||||
if (choice == ReprocessStoreChoice.DONTSSTART) {
|
if (choice == ReprocessStoreChoice.DONTSSTART) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean deleteOK = deleteOldData(choiceSummary, choice);
|
boolean deleteOK = deleteOldData(choiceSummary, choice);
|
||||||
boolean setupOK = setupInputStream(choiceSummary, choice);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user