fd
This commit is contained in:
parent
fc722bbe3a
commit
cfc59e2a28
1 changed files with 0 additions and 5 deletions
|
@ -535,13 +535,10 @@ IMGUR_KEY = environ.get("IMGUR_KEY", "").strip()
|
||||||
|
|
||||||
def check_processing_thread(v, post, link, db):
|
def check_processing_thread(v, post, link, db):
|
||||||
|
|
||||||
print("thread")
|
|
||||||
|
|
||||||
image_id = link.split('/')[-1].rstrip('.mp4')
|
image_id = link.split('/')[-1].rstrip('.mp4')
|
||||||
headers = {"Authorization": f"Client-ID {IMGUR_KEY}"}
|
headers = {"Authorization": f"Client-ID {IMGUR_KEY}"}
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
print("sex")
|
|
||||||
# break on error to prevent zombie threads
|
# break on error to prevent zombie threads
|
||||||
try:
|
try:
|
||||||
time.sleep(15)
|
time.sleep(15)
|
||||||
|
@ -902,7 +899,6 @@ def submit_post(v):
|
||||||
post_url = upload_video(file)
|
post_url = upload_video(file)
|
||||||
new_post.url = post_url
|
new_post.url = post_url
|
||||||
new_post.processing = True
|
new_post.processing = True
|
||||||
print("starting new thread")
|
|
||||||
gevent.spawn(check_processing_thread, v.id, new_post, post_url, g.db)
|
gevent.spawn(check_processing_thread, v.id, new_post, post_url, g.db)
|
||||||
except UploadException as e:
|
except UploadException as e:
|
||||||
if request.headers.get("Authorization"):
|
if request.headers.get("Authorization"):
|
||||||
|
@ -925,7 +921,6 @@ def submit_post(v):
|
||||||
post_url = upload_video(file)
|
post_url = upload_video(file)
|
||||||
new_post.url = post_url
|
new_post.url = post_url
|
||||||
new_post.processing = True
|
new_post.processing = True
|
||||||
print("starting new thread")
|
|
||||||
gevent.spawn(check_processing_thread, v.id, new_post, post_url, g.db)
|
gevent.spawn(check_processing_thread, v.id, new_post, post_url, g.db)
|
||||||
except UploadException as e:
|
except UploadException as e:
|
||||||
if request.headers.get("Authorization"):
|
if request.headers.get("Authorization"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue