forked from jhao104/proxy_pool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxyPool.py
43 lines (33 loc) · 952 Bytes
/
proxyPool.py
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
41
42
43
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: proxy_pool
Description : proxy pool 启动入口
Author : JHao
date: 2020/6/19
-------------------------------------------------
Change Activity:
2020/6/19:
-------------------------------------------------
"""
__author__ = 'JHao'
import click
from helper.launcher import startServer, startScheduler
from setting import BANNER, VERSION
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@click.group(context_settings=CONTEXT_SETTINGS)
@click.version_option(version=VERSION)
def cli():
"""ProxyPool cli工具"""
@cli.command(name="schedule")
def schedule():
""" 启动调度程序 """
click.echo(BANNER)
startScheduler()
@cli.command(name="server")
def server():
""" 启动api服务 """
click.echo(BANNER)
startServer()
if __name__ == '__main__':
cli()