Merge pull request #49 from neko404notfound/development

Requirements and traps.
This commit is contained in:
davfsa 2018-06-20 18:57:01 +02:00 committed by GitHub
commit 09384a7efa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 6 deletions

View File

@ -3,8 +3,13 @@ numpy==1.14.0
aiofiles aiofiles
# aiomultiprocess # aiomultiprocess
# aiosqlite # aiosqlite
# asyncpg
# dataclasses
# cached_property # cached_property
uvloop==0.9.1 uvloop==0.9.1
aiohttp==3.2.1 aiohttp==3.2.1
# Someone forgot to add this in.
asyncpg
# Music cog requirements
opuslib
dataclasses
PyNaCl
youtube_dl

View File

@ -1,6 +1,13 @@
#!/bin/bash #!/bin/bash
until python -m src; do # 20th June 2018
echo "Sebi-Machine shutdown with error: $?. Restarting..." >&2 # Esp: added a trap here, as it otherwise attempts to restart when given
sleep 1 # the interrupt signal. This is really annoying over SSH when I have
# a 1-second lag anyway.
trap "echo 'Received interrupt. Exiting.'; exit 0" SIGINT
until python -m src; do
# Added colouring to ensure the date of shutdown and the exit code stands
# out from the other clutter in the traceback that might have been output.
echo -e "\e[0;31m[$(date --utc)]\e[0m Sebi-Machine shutdown with error \e[0;31m$?\e[0m. Restarting..." >&2
sleep 1
done done