No Description

liyuyi@c-top.com.cn 3040d027a2 启动服务时只启动一个进程 3 years ago
.idea 64ac8db30c add 3 years ago
config bb364f070e 修改为需要连接池 3 years ago
get_material_and_script 0e53fa9d77 调整文件目录结构 3 years ago
logs e121efe736 add 4 years ago
models 9886d0ec9e model add 3 years ago
routers a81a4049af 添加日志 3 years ago
time_task d0a6162725 word_set.remove('') ,之前需要判断是否存在该key 3 years ago
utils 0e53fa9d77 调整文件目录结构 3 years ago
__init__.py 5e6e6df358 'init' 4 years ago
main.py 1f1b25a08d 解决跨域问题 3 years ago
readme.md 3040d027a2 启动服务时只启动一个进程 3 years ago

readme.md

项目功能介绍
按天依据配置的关键词定时从内外部(公司内部、快手、头条)获取优质素材的脚本和视频链接。

项目启动说明
0、kill 现有的服务进程
ps -aux | grep video_to_word
kill -9

1、切换到main.py所在的目录
cd /data/pythonProject/video_to_word/

2、启动虚拟环境
conda activate video_to_word

3、拉取最新代码
git pull http://git.tjyourong.com.cn/liyuyi/video_to_word.git

4、启动服务
gunicorn main:app -b 0.0.0.0:31013 -w 1 -k uvicorn.workers.UvicornWorker

2、查看日志
cd /data/pythonProject/video_to_word/logs/
tail -f /data/pythonProject/video_to_word/logs/main_server.2021

定时任务
查看定时任务:crontab -l
编辑定时任务:crontab -e
每天早上08:30执行
30 8 * * * /data/miniconda/envs/video_to_word/bin/python -u /data/pythonProject/video_to_word/time_task/get_material_and_script_by_query_word.py >> /data/pythonProject/video_to_word/logs/get_high_quality_material.log 2>&1
00 10 * * * /data/miniconda/envs/video_to_word/bin/python -u /data/pythonProject/video_to_word/time_task/get_word2vec_model.py >> /data/pythonProject/video_to_word/logs/get_word2vec_model.log 2>&1

服务接口
http://114.117.193.186:31013/docs