Update server information

This commit is contained in:
DingZQ
2024-12-07 16:59:18 +08:00
parent 9e855b4584
commit 65c9913e83
9 changed files with 40306 additions and 5 deletions
+109
View File
@@ -0,0 +1,109 @@
[TITLE]
[JUNCTIONS]
[RESERVOIRS]
[TANKS]
[PIPES]
[PUMPS]
[VALVES]
[DEMANDS]
[EMITTERS]
[STATUS]
[PATTERNS]
[CURVES]
[CONTROLS]
[ENERGY]
GLOBAL EFFICIENCY 0.7500
GLOBAL PRICE 0.0000
DEMAND CHARGE 0.0000
[QUALITY]
[SOURCES]
[MIXING]
File diff suppressed because it is too large Load Diff
+9
View File
@@ -14,6 +14,7 @@ from tjnetwork import *
import asyncio
import threading
from multiprocessing import Value
from fastapi.middleware.cors import CORSMiddleware
JUNCTION = 0
RESERVOIR = 1
@@ -36,6 +37,14 @@ if not os.path.exists(tmpDir):
app = FastAPI()
# 配置 CORS 中间件
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # 允许所有来源
allow_credentials=True, # 允许传递凭证(Cookie、HTTP 头等)
allow_methods=["*"], # 允许所有 HTTP 方法
allow_headers=["*"], # 允许所有 HTTP 头
)
# 定义一个共享变量
lock_simulation = Value('i', 0)
+2 -2
View File
@@ -1,3 +1,3 @@
d:
cd "d:\postgresql14\bin"
C:
cd "C:\pg-14.7\bin"
pg_ctl -D ../data -l logfile start
+3 -3
View File
@@ -1,3 +1,3 @@
f:
cd "f:\DEV\GitHub\TJWaterServer"
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
REM f:
REM cd "f:\DEV\GitHub\TJWaterServer"
uvicorn main:app --host 0.0.0.0 --port 80 --reload
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.