fix
All checks were successful
Deploy Dev / Build (pull_request) Successful in 9s
Deploy Dev / Push (pull_request) Successful in 18s
Deploy Dev / Deploy dev (pull_request) Successful in 8s
Deploy Prod / Build (pull_request) Successful in 8s
Deploy Prod / Push (pull_request) Successful in 14s
Deploy Prod / Deploy prod (pull_request) Successful in 9s
All checks were successful
Deploy Dev / Build (pull_request) Successful in 9s
Deploy Dev / Push (pull_request) Successful in 18s
Deploy Dev / Deploy dev (pull_request) Successful in 8s
Deploy Prod / Build (pull_request) Successful in 8s
Deploy Prod / Push (pull_request) Successful in 14s
Deploy Prod / Deploy prod (pull_request) Successful in 9s
This commit is contained in:
parent
8ea015e277
commit
06ca5f5f3c
7
Makefile
7
Makefile
@ -1,7 +1,6 @@
|
||||
gen:
|
||||
rm -rf schemas
|
||||
python generator.py queues
|
||||
python -m grpc_tools.protoc --proto_path schemas --python_out=. --pyi_out=. --grpc_python_out=. ./schemas/queues/tasks.proto
|
||||
rm -rf schemas
|
||||
curl https://platform.sprinthub.ru/generator >> generator.py
|
||||
python generator.py
|
||||
rm generator.py
|
||||
run:
|
||||
python ./server.py
|
16
generator.py
16
generator.py
@ -1,16 +0,0 @@
|
||||
import json
|
||||
import urllib.request
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
arg = sys.argv[-1]
|
||||
|
||||
|
||||
response = urllib.request.urlopen(f'https://platform.sprinthub.ru/schemas/get?project={arg}').read()
|
||||
data = json.loads(response)
|
||||
os.mkdir('schemas')
|
||||
os.mkdir(f'schemas/{arg}')
|
||||
for key, value in data.items():
|
||||
with open(f'schemas/{arg}/{key}', 'w+') as fp:
|
||||
fp.write(value)
|
Loading…
Reference in New Issue
Block a user