def setUpClass(cls): database_file = open(test_db_file, 'w+') database_file.close() AppRunner.datasource = cls.datasource BlockedContact.datasource = cls.datasource JobItem.datasource = cls.datasource RejectionPattern.datasource = cls.datasource User.datasource = cls.datasource AppRunner.get_instance().migrate_db() print 'Done setting up test db..'
def setUpClass(cls): database_file = open(test_db_file, "w+") database_file.close() AppRunner.datasource = cls.datasource BlockedContact.datasource = cls.datasource JobItem.datasource = cls.datasource RejectionPattern.datasource = cls.datasource User.datasource = cls.datasource AppRunner.get_instance().migrate_db() print "Done setting up test db.."
def re_run_job(job_name): Scheduler.get_scheduler().add_job( func=getattr(AppRunner.get_instance(), 'run_%s' % job_name)) return redirect(url_for('index'))
def re_run_job(job_name): Scheduler.get_scheduler().add_job(func=getattr(AppRunner.get_instance(), "run_%s" % job_name)) return redirect(url_for("index"))