-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrun.py
More file actions
executable file
·40 lines (30 loc) · 831 Bytes
/
Copy pathrun.py
File metadata and controls
executable file
·40 lines (30 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
'''
-----------------------------------
FileName: run
Description: 主函数
Author: 瓦都尅
Date: 2019/11/2
-----------------------------------
'''
import click
from manager.proxy_schedule import run_schedule
from app.api import run_web
from conf.setting import LOGO
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@click.group(context_settings=CONTEXT_SETTINGS)
@click.version_option(version='1.0.0')
def main():
"""PrxoyPool主函数"""
@main.command(name='schedule')
def schedule():
"""启动代理管理程序"""
click.echo(LOGO)
run_schedule()
@main.command(name='webserver')
def web():
"""启动web服务"""
click.echo(LOGO)
run_web()
if __name__ == '__main__':
main()