Esempio n. 1
0
def main():
    """Start the initial sync and oubound delta thread."""
    initialize_ldap_sync()
    # Create sync listener threads.
    outbound_sync_thread = DeltaSyncThread("LDAP Outbound", ldap_outbound_listener)
    # Start sync listener threads.
    outbound_sync_thread.start()
def main():
    """Start the initial sync and outbound delta thread."""
    ldap_server = get_config("LDAP_SERVER")
    if not ldap_server:
        LOGGER.warning("No LDAP provider configured, exiting...")
        return

    # wait 5 seconds before starting, to provide time for dependent services to start up
    time.sleep(5)
    initialize_ldap_sync()
    # Create sync listener threads.
    outbound_sync_thread = DeltaSyncThread("LDAP Outbound",
                                           ldap_outbound_listener)
    # Start sync listener threads.
    outbound_sync_thread.start()
Esempio n. 3
0
def main():
    """Start the initial sync and outbound delta thread."""
    env = Env()
    ldap_enabled = env.int("ENABLE_LDAP_SYNC", 0)
    if not ldap_enabled:
        LOGGER.warning("LDAP sync not enabled. Exiting...")
        return
    ldap_server = os.getenv("LDAP_SERVER")
    if not ldap_server:
        LOGGER.warning("No LDAP provider configured. Exiting...")
        return

    # wait 5 seconds before starting, to provide time for dependent services to start up
    time.sleep(5)
    initialize_ldap_sync()
    # Create sync listener threads.
    outbound_sync_thread = DeltaSyncThread("LDAP Outbound",
                                           ldap_outbound_listener)
    # Start sync listener threads.
    outbound_sync_thread.start()