NDOJ/judge/event_poster.py

22 lines
373 B
Python
Raw Permalink Normal View History

2020-01-21 06:35:58 +00:00
from django.conf import settings
2022-05-14 17:57:27 +00:00
__all__ = ["last", "post"]
2020-01-21 06:35:58 +00:00
if not settings.EVENT_DAEMON_USE:
real = False
def post(channel, message):
return 0
def last():
return 0
2022-05-14 17:57:27 +00:00
elif hasattr(settings, "EVENT_DAEMON_AMQP"):
2020-01-21 06:35:58 +00:00
from .event_poster_amqp import last, post
2022-05-14 17:57:27 +00:00
2020-01-21 06:35:58 +00:00
real = True
else:
from .event_poster_ws import last, post
2022-05-14 17:57:27 +00:00
2020-01-21 06:35:58 +00:00
real = True