diff --git a/app/middleware/models.py b/app/middleware/models.py index 191c9432..5f95e9cb 100644 --- a/app/middleware/models.py +++ b/app/middleware/models.py @@ -215,14 +215,18 @@ def __init__(self, jobs=None, files=None, func=None, options=None, date=None): now = datetime.now() now = now.strftime("%Y-%m-%d-%H-%M-%S-%f") date = now - self.jobs = {} # {'somename': instance of RQ.Job} Only used when enqueing. - self.final_jobs = {} # Jobs for every file in the request. - self.cache = [] # For temporary storage of RQ.Jobs. + + # Variables for generating run signature. self.sig = None self.files = files self.func = func # Additional attribute for storing pipeline function. self.options = options self.signature() # Create & Store a signature for the pipeline. + + # Addition variables. + self.jobs = {} # {'somename': instance of RQ.Job} Only used when enqueing. + self.final_jobs = {} # Jobs for every file in the request. + self.cache = [] # For temporary storage of RQ.Jobs. self.date = date self.done = False # Bypass for the self.complete() method. diff --git a/app/routes/ra_posts.py b/app/routes/ra_posts.py index 477e6046..1a1ef570 100644 --- a/app/routes/ra_posts.py +++ b/app/routes/ra_posts.py @@ -283,7 +283,7 @@ def upload(): pipeline = pipeline ) jobs_dict.update(jobs_enqueued) - pipeline.cache_jobs(filename) + pipeline.cache_jobs(f) print 'upload(): all files enqueued, returning...' pipeline.merge_jobs()