Update
Тестирование ядра / Tester (push) Failing after 2s

This commit is contained in:
2026-05-30 01:04:42 +03:00
parent 9084f8d67f
commit 084197464f
3 changed files with 20 additions and 2 deletions
+3 -2
View File
@@ -39,11 +39,12 @@ async def server_run():
host,
port
)
async with server:
await server.serve_forever()
print(f"======= Serving on http://{host}:{port}/ ======")
async with server:
await server.serve_forever()
def handler_server(args):
loop.add_signal_handler(
+12
View File
@@ -0,0 +1,12 @@
__author__ = 'RemiZOffAlex'
__email__ = 'remizoffalex@mail.ru'
from .response import Response
def abort(code, message=''):
return Response(
message,
mimetype='text/plain',
code=404
)
@@ -7,7 +7,12 @@ class Response:
self.code = 200
self.phrase = 'Success'
self.version = 'HTTP/1.1'
self.headers = {}
self.content_type = "text/plain"
self.__data = data
for key in kwargs:
if key in self.__dict__:
setattr(self, key, kwargs[key])
def __call__(self):
status = ' '.join([self.version, str(self.code), self.phrase])