def METHOD_NAME(immediate=False) -> None:
    now = datetime.datetime.now()
    idents = _relevant_idents().filter(digest_frequency__isnull=False)
    for i in idents:
        # whose digest is actually due?
        if i.last_digest < now - datetime.timedelta(hours=i.digest_frequency):
            if immediate:
                # send now, without celery tasks
                send_digest.apply(args=[i.id])
            else:
                send_digest.delay(i.id)
    # create any missing Identity objects, so we pick them up on the next run.
    if immediate:
        create_instr_idents.apply()
    else:
        create_instr_idents.delay()