13 lines
347 B
Python
13 lines
347 B
Python
from django.db.models.signals import post_save
|
|
from django.dispatch import receiver
|
|
|
|
from games.models import EventGame
|
|
|
|
from .tasks import start_clock_heartbeat
|
|
|
|
|
|
@receiver(post_save, sender=EventGame)
|
|
def on_event_game_saved(sender, instance, **kwargs):
|
|
if instance.game.path == "clock" and instance.enabled:
|
|
start_clock_heartbeat()
|