def handle(self, *args, **options): """ Run through all the old .fec files and process 'em""" print "Getting files" filecount = 0 filenums = [] for d, _, files in os.walk(FILECACHE_DIRECTORY): for a in files: filecount += 1 filingnum = a.replace(".fec", "") #print "%s: Found filing: %s" % (filecount, filingnum) #if (int(filingnum)>785500): filenums.append(filingnum) #print "%s: Found filing: %s" % (filecount, filingnum) # make sure we process them in order !! filenums.sort() #filenums = [766892, 762315] print "Processing files" for filingnum in filenums: print "processing %s" % (filingnum) process_file(filingnum, self.fp)
def handle(self, *args, **options): self.FEClogger.info('LOAD_MANUALLY - starting human triggered run') filing_numbers = [846635] for filing_number in filing_numbers: process_file(filing_number, self.fp) sleep(1)
def handle(self, *args, **options): self.FEClogger.info('LOAD_FROM_ ARCHIVED _FILINGS - starting run') new_filings = get_file_list() for this_filing in new_filings: print "Need to process filing %s" % (this_filing) # only process forms we care about -- we need to process all F3X's though, because anyone might make IEs process_file(this_filing, self.fp)
def handle(self, *args, **options): self.FEClogger.info('LOAD_FROM_UNPROCESSED_FILINGS - starting regular run') unprocessed_filings = unprocessed_filing.objects.filter(filing_is_parsed=False).order_by('filing_number') for filing in unprocessed_filings: print "Need to process filing %s" % (filing.filing_number) # only process forms we care about -- we need to process all F3X's though, because anyone might make IEs if filing.form_type in ('F3XN', 'F3XA', 'F3XT', 'F24N', 'F24A', 'F5N', 'F5A'): process_file(filing.filing_number, self.fp) sleep(1) filing.filing_is_parsed=True filing.save()