1 Star 0 Fork 0

Serverless Devs Registry / start-ffmpeg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
publish.py 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
aliyunfc 提交于 2022-02-24 18:13 . release transcode
import subprocess
import time
def getContent(fileList):
for eveFile in fileList:
try:
with open(eveFile) as f:
return f.read()
except:
pass
return None
with open('update.list') as f:
publish_list = [eve_app.strip() for eve_app in f.readlines()]
for eve_app in publish_list:
times = 1
while times <= 3:
print("----------------------: ", eve_app)
publish_script = 'https://serverless-registry.oss-cn-hangzhou.aliyuncs.com/publish-file/python3/hub-publish.py'
command = 'cd %s && wget %s && python hub-publish.py' % (
eve_app, publish_script)
child = subprocess.Popen(
command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, )
stdout, stderr = child.communicate()
if child.returncode == 0:
print("stdout:", stdout.decode("utf-8"))
break
else:
print("stdout:", stdout.decode("utf-8"))
print("stderr:", stderr.decode("utf-8"))
time.sleep(3)
if times == 3:
raise ChildProcessError(stderr)
times = times + 1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/devsapp/start-ffmpeg.git
git@gitee.com:devsapp/start-ffmpeg.git
devsapp
start-ffmpeg
start-ffmpeg
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891