Geoffrey-Django/apps.py

20 lines
649 B
Python
Raw Normal View History

2018-12-02 02:17:19 +00:00
from django.apps import AppConfig
import subprocess
import sys
import os
path = os.path.dirname(os.path.abspath(__file__)) + "/assets/bots/geoffrey.py"
class GeoffreyAppConfig(AppConfig):
name = 'GeoffreyApp'
verbose_name = "Geoffrey: Minecraft Web Database"
def ready(self):
import GeoffreyApp.background_tasks as background_tasks
background_tasks.run_tasks()
#subprocess.run('screen -X -S "{0}" quit'.format("geoffrey"), shell=True)
2018-12-08 21:37:00 +00:00
#subprocess.run(
# 'screen -S geoffrey -d -m {} {}'.format(sys.executable, path),
# shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)