-
Notifications
You must be signed in to change notification settings - Fork 0
/
jobs.py
26 lines (22 loc) · 860 Bytes
/
jobs.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
import asyncio
import argparse
from docs_qa import generate_search_phrases
from github_qa.sync_issues import main as sync_issues
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('job',
type=str,
default='',
help='Specify a job name - "generate_search_phrases", "sync_github_issues"')
parser.add_argument('param1',
nargs='?',
default=None,
type=str,
help='Specify a parameter')
args = parser.parse_args()
if args.job == 'generate_search_phrases':
asyncio.run(generate_search_phrases.run(args.param1))
elif args.job == 'sync_github_issues':
sync_issues()
else:
print(f'Unknown job name "{args.job}"')