def handle(self, *args, **options): users = User.objects.filter(player__isnull=True, is_superuser=False) for user in users: player = Player.objects.create(user=user, name=user.first_name) update_player.delay(player.id)
def handle(self, *args, **options): for player in Player.objects.all(): update_player.delay(player.id)
def handle(self, *args, **options): users = User.objects.filter(player__isnull=True, is_superuser=False) for user in users: player = Player.objects.create(user=user,name=user.first_name) update_player.delay(player.id)