Skip to content
Browse files

Move processor initialization inline to allow for thrown exceptions.

  • Loading branch information...
1 parent cc1143f commit 74149d0997235ce9d024281e1f0bd33471a13c05 @GraylinKim GraylinKim committed Apr 30, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/main/java/gov/nysenate/openleg/scripts/Ingest.java
View
10 src/main/java/gov/nysenate/openleg/scripts/Ingest.java
@@ -28,11 +28,6 @@
public class Ingest {
public static Logger logger = Logger.getLogger(Ingest.class);
- public static BillProcessor billProcessor = new BillProcessor();
- public static CalendarProcessor calendarProcessor = new CalendarProcessor();
- public static AgendaProcessor agendaProcessor = new AgendaProcessor();
- public static TranscriptProcessor transcriptProcessor = new TranscriptProcessor();
-
public static class FileNameComparator implements Comparator<File> {
@Override
public int compare(File a, File b) {
@@ -70,6 +65,11 @@ public static void main(String[] args) throws Exception {
Collection<File> files = FileUtils.listFiles(new File(required[0]), null, true);
Collections.sort((List<File>)files, new FileNameComparator());
+ BillProcessor billProcessor = new BillProcessor();
+ CalendarProcessor calendarProcessor = new CalendarProcessor();
+ AgendaProcessor agendaProcessor = new AgendaProcessor();
+ TranscriptProcessor transcriptProcessor = new TranscriptProcessor();
+
// Process each file individually, flushing changes to storage as necessary
// Each file processor should produce a change log indicating what happened
timer.start();

0 comments on commit 74149d0

Please sign in to comment.
Something went wrong with that request. Please try again.