def analyze(self, groups, analyst, module_name=None, options={}): analysis = Analysis({ 'file': self['_id'], 'module': module_name, 'options': options, 'groups': list(set(groups + self['groups'])), 'analyst': analyst }) analysis.save() self.add_groups(groups) self.append_to('analysis', analysis['_id']) analysis.resume() return analysis
def resume(self, id): analysis = Analysis(get_or_404(Analysis.get_collection(), _id=id)) analysis.resume() flash("Resumed analysis {}".format(analysis['_id'])) return redirect({}, url_for('SystemView:index'))