Adjusts the celerybeat entrypoint, and guards mongo initialization