소스 검색

Fix aioquic on Heroku

http3
tech234a 3 년 전
부모
커밋
34b51fa83e
2개의 변경된 파일12개의 추가작업 그리고 5개의 파일을 삭제
  1. +12
    -0
      http3.py
  2. +0
    -5
      worker.py

+ 12
- 0
http3.py 파일 보기

@@ -1,3 +1,15 @@
from os import system
from os.path import isfile
HEROKU = False
if isfile("../Procfile") and isfile("../requirements.txt"):
print("Heroku detected... using 20 threads instead of 50.")
HEROKU = True

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

import asyncio
from typing import cast
from urllib.parse import urlparse


+ 0
- 5
worker.py 파일 보기

@@ -10,11 +10,6 @@ if isfile("../Procfile") and isfile("../requirements.txt"):
print("Heroku detected... using 20 threads instead of 50.")
HEROKU = True

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

import signal

import tracker


불러오는 중...
취소
저장