refactor: change random sleep into workflow

This commit is contained in:
y1ndan 2021-01-04 11:31:38 +08:00
parent 13f13d4076
commit ea76e7bc26
2 changed files with 1 additions and 5 deletions

View File

@ -39,5 +39,6 @@ jobs:
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
sleep $(shuf -i 10-300 -n 1)
echo "${{ secrets.COOKIE }}" | tr '#' "\n" | sed 's/$/&#${{ secrets.SCKEY }}/g' | xargs -I {} sh -c 'echo "{}" | python3 ./genshin.py' echo "${{ secrets.COOKIE }}" | tr '#' "\n" | sed 's/$/&#${{ secrets.SCKEY }}/g' | xargs -I {} sh -c 'echo "{}" | python3 ./genshin.py'

View File

@ -276,11 +276,6 @@ if __name__ == '__main__':
secret.append('') secret.append('')
cookie = secret[0] cookie = secret[0]
sckey = secret[1] sckey = secret[1]
seconds = random.randint(10, 300)
#seconds = random.randint(1, 3)
logging.info('将在 {} 秒后开始任务...'.format(seconds))
time.sleep(seconds)
Sign(cookie).run() Sign(cookie).run()