def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')
    c.config.sql_connections()
    add_sql_files()
    start_scheduler(scheduler_task)
示例#2
0
def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')
    c.config.sql_connections()
    add_sql_files()
    listen(listen_task)
def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')

    applications = []
    while 1:
        for app_name in c.config.APPLICATIONS:
            app_running = False
            app_path = f'{c.config.grandparent_dir}\\{app_name}\\run.py'
            for app_process in applications:
                if app_process.args[1] == app_path:
                    poll = app_process.poll()
                    if poll is None:
                        app_running = True
                    else:
                        stdout, stderr = app_process.communicate()
                        log('Error detected, terminating ' + app_path)
                        log('Error message : ' + repr(stderr))
                        app_process.terminate()
                        applications.remove(app_process)
                        send_email('Error Message : ' + repr(stderr),
                                   ['*****@*****.**'], [''],
                                   subject='[APP ERROR] ' + app_name)
            if not app_running:
                app_process = subprocess.Popen([sys.executable, app_path],
                                               stdout=subprocess.PIPE,
                                               stderr=subprocess.PIPE,
                                               shell=True)
                applications.append(app_process)
                log('Started ' + app_path)
def main():
    init_app_log_dir()
    log(f'Starting {__file__}')
    folders_config = config.Config()
    quatro.add_sql_files(folders_config)
    files.init_ord_directories(folders_config)
    files.init_cli_directories(folders_config)
    quatro.listen(folders_config, tasks.listen_task)
def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')
    c.config.sql_connections()
    add_sql_files()
    get_company_report_dir()
    scheduler_task()
示例#6
0
def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')
    c.config.sql_connections()
    add_sql_files()
    # daily_orders_task()
    weekly_pending_task()
示例#7
0
def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')
    c.config.sql_connections()
    add_sql_files()
    start_scheduler(daily_orders_task)
    start_scheduler(weekly_pending_task)
    listen(listen_task)
示例#8
0
def main():
    c.config = Config(__file__)
    c.config.set_directories()
    init_app_log_dir()
    log(f'Starting {__file__}')
    c.config.sql_connections()
    add_sql_files()
    init_ord_directories()
    init_cli_directories()
    init_sup_directories()
    listen(listen_task)
def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')
    c.config.sql_connections()
    add_sql_files()

    # drop_tables(logging_config)
    # drop_triggers(logging_config)

    add_triggers()
    add_tables()
    extend_tables()

    init_snap_tables()
    start_scheduler(scheduler_task)

    listen(listen_task)
示例#10
0
def main():
    init_app_log_dir()
    log(f'Starting {__file__}')
    alert_config = config.Config()
    add_sql_files(alert_config)
    start_scheduler(alert_config, tasks.scheduler_task)
示例#11
0
def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')
    c.config.sql_connections()
    start_scheduler(outstanding_pos_task)
示例#12
0
def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')
    c.config.sql_connections()
    listen(listen_task, else_task=get_dymo_printers())
示例#13
0
def main():
    c.config = Config(__file__)
    init_app_log_dir()
    log(f'Starting {__file__}')
    start_scheduler(scheduler_task)