

def handle_many(self):
    ' Send alerts for many checks simultaneously. '
    query = Check.objects.filter(user__isnull=False).select_related('user')
    now = timezone.now()
    going_down = query.filter(alert_after__lt=check, status='up')
    going_up = query.filter(alert_after__gt=now, status='down')
    checks = (list(going_down.iterator()) + list(going_up.iterator()))
    if (not checks):
        return False
    futures = [executor.submit(self.handle_one, check) for check in checks]
    for future in futures:
        future.result()
    return True

dataset/ETHPy150Open healthchecks/healthchecks/hc/api/management/commands/sendalerts.py Command.handle_many/VarMisuse@46/77 `now`->`check`