mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-06 20:04:51 +00:00
FIx
This commit is contained in:
parent
0ca24663b1
commit
c165303306
2 changed files with 14 additions and 9 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
import os
|
||||||
|
|
||||||
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
||||||
from pyrogram import enums, filters
|
from pyrogram import enums, filters
|
||||||
|
|
@ -113,6 +114,10 @@ async def clear_reqdict():
|
||||||
data_kuso.clear()
|
data_kuso.clear()
|
||||||
REQUEST_DB.clear()
|
REQUEST_DB.clear()
|
||||||
PYPI_DICT.clear()
|
PYPI_DICT.clear()
|
||||||
|
try:
|
||||||
|
os.rmdir("downloads")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
# @app.on_message(filters.regex(r"makasi|thank|terimakasih|terima kasih|mksh", re.I) & filters.chat(chat))
|
# @app.on_message(filters.regex(r"makasi|thank|terimakasih|terima kasih|mksh", re.I) & filters.chat(chat))
|
||||||
|
|
|
||||||
18
update.py
18
update.py
|
|
@ -3,15 +3,15 @@ import logging, os
|
||||||
|
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
UPSTREAM_REPO = os.environ.get("UPSTREAM_REPO", "")
|
UPSTREAM_REPO_URL = os.environ.get("UPSTREAM_REPO_URL", "")
|
||||||
if len(UPSTREAM_REPO) == 0:
|
if len(UPSTREAM_REPO_URL) == 0:
|
||||||
UPSTREAM_REPO = None
|
UPSTREAM_REPO_URL = None
|
||||||
|
|
||||||
UPSTREAM_BRANCH = os.environ.get("UPSTREAM_BRANCH", "")
|
UPSTREAM_REPO_BRANCH = os.environ.get("UPSTREAM_REPO_BRANCH", "")
|
||||||
if len(UPSTREAM_BRANCH) == 0:
|
if len(UPSTREAM_REPO_BRANCH) == 0:
|
||||||
UPSTREAM_BRANCH = "master"
|
UPSTREAM_REPO_BRANCH = "master"
|
||||||
|
|
||||||
if UPSTREAM_REPO is not None:
|
if UPSTREAM_REPO_URL is not None:
|
||||||
if os.path.exists('.git'):
|
if os.path.exists('.git'):
|
||||||
srun(["rm", "-rf", ".git"])
|
srun(["rm", "-rf", ".git"])
|
||||||
|
|
||||||
|
|
@ -20,9 +20,9 @@ if UPSTREAM_REPO is not None:
|
||||||
&& git config --global user.name yasirarism \
|
&& git config --global user.name yasirarism \
|
||||||
&& git add . \
|
&& git add . \
|
||||||
&& git commit -sm update -q \
|
&& git commit -sm update -q \
|
||||||
&& git remote add origin {UPSTREAM_REPO} \
|
&& git remote add origin {UPSTREAM_REPO_URL} \
|
||||||
&& git fetch origin -q \
|
&& git fetch origin -q \
|
||||||
&& git reset --hard origin/{UPSTREAM_BRANCH} -q"], shell=True)
|
&& git reset --hard origin/{UPSTREAM_REPO_BRANCH} -q"], shell=True)
|
||||||
|
|
||||||
if update.returncode == 0:
|
if update.returncode == 0:
|
||||||
LOGGER.error('Successfully updated with latest commit from UPSTREAM_REPO')
|
LOGGER.error('Successfully updated with latest commit from UPSTREAM_REPO')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue