def __init__(
        self,
        interval: float = 20.0,
        retry_interval: float = 10.0,
        url: Optional[str] = None,
        db_name: str = "sacred",
        collection: str = "runs",
        overwrite: Optional[Union[int, str]] = None,
        priority: int = DEFAULT_MONGO_PRIORITY,
        client: Optional["pymongo.MongoClient"] = None,
        **kwargs,
    ):
        """Initializer for MongoObserver.

        Parameters
        ----------
        interval
            The interval in seconds at which the background thread is woken up to
            process new events.
        retry_interval
            The interval in seconds to wait if an event failed to be processed.
        url
            Mongo URI to connect to.
        db_name
            Database to connect to.
        collection
            Collection to write the runs to. (default: "runs").
        overwrite
            _id of a run that should be overwritten.
        priority
            (default 30)
        client
            Client to connect to. Do not use client and URL together.
        failure_dir
            Directory to save the run of a failed observer to.
        """
        super().__init__(
            QueueCompatibleMongoObserver(
                url=url,
                db_name=db_name,
                collection=collection,
                overwrite=overwrite,
                priority=priority,
                client=client,
                **kwargs,
            ),
            interval=interval,
            retry_interval=retry_interval,
        )
Initializer for MongoObserver.

        Parameters
        ----------
        interval
            The interval in seconds at which the background thread is woken up to
            process new events.
        retry_interval
            The interval in seconds to wait if an event failed to be processed.
        url
            Mongo URI to connect to.
        db_name
            Database to connect to.
        collection
            Collection to write the runs to. (default: "runs").
        overwrite
            _id of a run that should be overwritten.
        priority
            (default 30)
        client
            Client to connect to. Do not use client and URL together.
        failure_dir
            Directory to save the run of a failed observer to.
        
sacred/observers/mongo.py