def run_idss(self, msg): (filename, filepath, jobname, email) = msg.split("|") with app.app_context(): log.debug("now going to do long IDSS job via celery") message = 'processing...' self.update_state(state='PROGRESS', meta={'status': message}) #set status to busy set_status_to_busy(jobname) seriation = IDSS() arguments = { 'inputfile': filename, 'outputdirectory': filepath, 'debug': 0 } seriation.initialize(arguments) log.debug( "seriation initialized with args. Now running IDSS for %s and job %s", (filename, jobname)) (frequencyResults, continuityResults, exceptionList, statsMap) = seriation.seriate() message = 'done. zipping results....' self.update_state(state='PROGRESS', meta={'status': message}) log.debug('Finished with IDSS processing for job %s', jobname) zipFileURL = zipresults(jobname) send_email(zipFileURL, email, jobname) message = 'done. emailing results....' self.update_state(state='PROGRESS', meta={'status': message}) set_status_to_free(jobname) message = 'complete.' self.update_state(state='PROGRESS', meta={'status': message})