Exemple #1
0
    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..'
Exemple #2
0
    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.."
Exemple #3
0
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'))
Exemple #4
0
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"))