да, создаю бой, создается таска
@receiver(post_save, sender=models.Fight) def run_task_start_fight(sender, instance, created, *args, **kwargs): if created: opponent_waiting_time = timezone.now() + datetime.timedelta(seconds=settings.OPPONENT_WAITING_TIME) task_is_start_fight.apply_async(args=[instance.id], eta=opponent_waiting_time)
Обсуждают сегодня