mirror of
https://github.com/skylanix/MamieHenriette.git
synced 2026-02-06 06:40:35 +01:00
Premlier essai de humble bundle, j'arrive pas à lister les canauxx dans la page de configuration
This commit is contained in:
21
run-web.py
21
run-web.py
@@ -1,25 +1,32 @@
|
||||
#
|
||||
# import discordbot
|
||||
|
||||
import multiprocessing
|
||||
import locale
|
||||
import logging
|
||||
import multiprocessing
|
||||
from webapp import webapp
|
||||
from discordbot import bot
|
||||
|
||||
def start_server():
|
||||
logging.info("Start Web Serveur")
|
||||
from webapp import webapp
|
||||
from waitress import serve
|
||||
serve(webapp, host="0.0.0.0", port=5000)
|
||||
# webapp.run()
|
||||
|
||||
def start_discord_bot():
|
||||
logging.info("Start Discord Bot")
|
||||
from discordbot import bot
|
||||
bot.begin()
|
||||
with webapp.app_context():
|
||||
bot.begin()
|
||||
|
||||
if __name__ == '__main__':
|
||||
locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8')
|
||||
|
||||
jobs = []
|
||||
jobs.append(multiprocessing.Process(target=start_server))
|
||||
jobs.append(multiprocessing.Process(target=start_discord_bot))
|
||||
jobs.append(multiprocessing.Process(target=start_server))
|
||||
|
||||
for job in jobs: job.start()
|
||||
|
||||
print(bot.get_all_channels())
|
||||
|
||||
for job in jobs: job.join()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user