From 5ece90166f8aa943bc9895ca9975159c67b7fe25 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Thu, 1 Sep 2022 23:32:26 +0300 Subject: [PATCH] minor --- Sources/pyOpenRPA/Orchestrator/Server.py | 25 +++++++++++-------- .../Orchestrator/__Orchestrator__.py | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Sources/pyOpenRPA/Orchestrator/Server.py b/Sources/pyOpenRPA/Orchestrator/Server.py index 1bd7c765..1e616148 100755 --- a/Sources/pyOpenRPA/Orchestrator/Server.py +++ b/Sources/pyOpenRPA/Orchestrator/Server.py @@ -35,6 +35,19 @@ import mimetypes mimetypes.add_type("font/woff2",".woff2") mimetypes.add_type("text/javascript",".js") + + +from typing import Union +# объявление import +from fastapi import FastAPI, Form, Request, HTTPException, Depends, Header, Response, Body +from fastapi.responses import PlainTextResponse, HTMLResponse, FileResponse +from fastapi.staticfiles import StaticFiles +from fastapi.templating import Jinja2Templates + +from pydantic import BaseModel +import uvicorn + + gCacheDict = {} @@ -468,16 +481,6 @@ class HTTPRequestOld(): -from typing import Union -# объявление import -from fastapi import FastAPI, Form, Request, HTTPException, Depends, Header, Response, Body -from fastapi.responses import PlainTextResponse, HTMLResponse, FileResponse -from fastapi.staticfiles import StaticFiles -from fastapi.templating import Jinja2Templates - -from pydantic import BaseModel -import random -import uvicorn # инициализация @@ -598,4 +601,4 @@ def InitFastAPI(): #if lL: lL.info(f"Сервер инициализирован успешно (с поддержкой SSL):: Наименование: {self.name}, Слушает URL: {lAddressStr}, Слушает порт: {lPortInt}, Путь к файлу сертификата (.pem): {lCertFilePathStr}") #if lL: lL.info(f"Сервер инициализирован успешно (без поддержки SSL):: Наименование: {self.name}, Слушает URL: {lAddressStr}, Слушает порт: {lPortInt}") - if lL: lL.info("Модуль сервера (FastAPI) инициализирован!") #Logging \ No newline at end of file + \ No newline at end of file diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index e3223d89..e0abbd15 100755 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -2758,7 +2758,7 @@ def Orchestrator(inGSettings=None, inDumpRestoreBool = True, inRunAsAdministrato lListenDict = gSettingsDict.get("ServerDict",{}).get("ListenDict",{}) for lItemKeyStr in lListenDict: lItemDict = lListenDict[lItemKeyStr] - Server.FastAPI() + Server.InitFastAPI()