瀏覽代碼

Fix loop Heroku

http3
tech234a 3 年之前
父節點
當前提交
7763be8310
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      worker.py

+ 2
- 1
worker.py 查看文件

@@ -1,6 +1,7 @@
from os import system
from os.path import isfile
from sys import exit
from importlib.util import find_spec

HEROKU = False
if isfile("../Procfile") and isfile("../requirements.txt"):
@@ -8,7 +9,7 @@ if isfile("../Procfile") and isfile("../requirements.txt"):
HEROKU = True

if HEROKU:
if not "aioquic" in open("../requirements.txt").read():
if find_spec("aioquic") is None:
print("Installing aioquic on this Heroku instance since it wasn't installed on deploy...")
system("python3 -m pip install --user aioquic")
system("python3 worker.py")


Loading…
取消
儲存