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

This commit is contained in:
emmatveev 2024-12-08 19:34:56 +03:00
parent 8ea015e277
commit 06ca5f5f3c
3 changed files with 5 additions and 22 deletions

View File

@ -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

View File

@ -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)

View File

@ -3,8 +3,8 @@ import datetime
import grpc
import bson
import tasks_pb2
import tasks_pb2_grpc
from queues import tasks_pb2
from queues import tasks_pb2_grpc
from utils import time
from storage.mongo import tasks