Cloned DMOJ
This commit is contained in:
parent
f623974b58
commit
49dc9ff10c
513 changed files with 132349 additions and 39 deletions
18
judge/event_poster.py
Normal file
18
judge/event_poster.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from django.conf import settings
|
||||
|
||||
__all__ = ['last', 'post']
|
||||
|
||||
if not settings.EVENT_DAEMON_USE:
|
||||
real = False
|
||||
|
||||
def post(channel, message):
|
||||
return 0
|
||||
|
||||
def last():
|
||||
return 0
|
||||
elif hasattr(settings, 'EVENT_DAEMON_AMQP'):
|
||||
from .event_poster_amqp import last, post
|
||||
real = True
|
||||
else:
|
||||
from .event_poster_ws import last, post
|
||||
real = True
|
Loading…
Add table
Add a link
Reference in a new issue