Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
文鑫
/
guduo_spider
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
e4efcea7
...
e4efcea781690c3eb8c622e58cbd8512f3d8d22c
authored
2024-12-24 10:31:49 +0800
by
wenxin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
脚本调整
1 parent
7e5b9c63
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
start.sh
stop.sh
start.sh
View file @
e4efcea
...
...
@@ -6,7 +6,7 @@ conda activate spider
# 切换到 app 目录
cd
./app
||
exit
# 后台运行 FastAPI 应用
nohup python main.py &
nohup python main.py
--instance-id
=
guo_duo_spider
&
# 输出进程ID到文件,以便于后续停止服务时使用
echo
$!
> fastapi.pid
# 在启动之后输出pid文件中的进程ID
...
...
stop.sh
View file @
e4efcea
#!/bin/bash
# 指定你的Python脚本的完整路径
SCRIPT_PATH
=
"
/topdraw/app/spider/guduo_spider/app/main.py
"
SCRIPT_PATH
=
"
python main.py --instance-id=guo_duo_spider
"
# 查找与给定路径匹配的进程ID
PIDS
=
$(
pgrep -f
"
$SCRIPT_PATH
"
)
...
...
Please
register
or
sign in
to post a comment