-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-click.py
More file actions
47 lines (35 loc) · 815 Bytes
/
test-click.py
File metadata and controls
47 lines (35 loc) · 815 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
41
42
43
44
45
46
47
import click
@click.group()
@click.version_option()
def cli():
"""Tanit.
tanit: A simple thrift client for tanit service.
"""
@cli.command()
#@click.option("--standalone", "-s", is_flag=True, help="Enables standalone mode.")
def master():
"""Run the tanit master."""
print("Start master")
@cli.command()
def worker():
"""Run the tanit worker."""
print("Start worker")
@cli.group("jobs")
def jobs():
"""Manage tanit jobs."""
@jobs.command("-submit")
@click.argument("job")
def job_submit(job):
"""Submit a job"""
@jobs.command("-list")
def job_list():
print("list job")
@jobs.command("-status")
def job_status():
print("list job")
@cli.command()
def admin():
"""Run the tanit admin client."""
print("Start worker")
if __name__ == "__main__":
cli()