示例#1
0
文件: tests.py 项目: noushadali/zjobs
    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..'
示例#2
0
文件: tests.py 项目: peisam/zjobs
    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.."
示例#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'))
示例#4
0
文件: jobboard.py 项目: peisam/zjobs
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"))