NDOJ/dmoj_bridge_async.py

24 lines
678 B
Python
Raw Normal View History

2020-07-19 21:27:14 +00:00
import os
import gevent.monkey # noqa: I100, gevent must be imported here
2022-05-14 17:57:27 +00:00
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dmoj.settings")
2020-07-19 21:27:14 +00:00
gevent.monkey.patch_all()
# noinspection PyUnresolvedReferences
import dmoj_install_pymysql # noqa: E402, F401, I100, I202, imported for side effect
import django # noqa: E402, F401, I100, I202, django must be imported here
2022-05-14 17:57:27 +00:00
2020-07-19 21:27:14 +00:00
django.setup()
# noinspection PyUnresolvedReferences
import django_2_2_pymysql_patch # noqa: E402, I100, F401, I202, imported for side effect
2022-05-14 17:57:27 +00:00
from judge.bridge.daemon import (
judge_daemon,
) # noqa: E402, I100, I202, django code must be imported here
2020-07-19 21:27:14 +00:00
2022-05-14 17:57:27 +00:00
if __name__ == "__main__":
2020-07-19 21:27:14 +00:00
judge_daemon()