(self, event_dict=None)
Commit an event to OpenSearch.

        Args:
            event_dict: (optional) Dictionary with updated event attributes.
            Defaults to self.updated_event.
Commit an event to OpenSearch.
Commit an event to OpenSearch .
def commit(self, event_dict=None):
        """Commit an event to OpenSearch.

        Args:
            event_dict: (optional) Dictionary with updated event attributes.
            Defaults to self.updated_event.
        """
        if event_dict:
            event_to_commit = event_dict
        else:
            event_to_commit = self.updated_event

        if not event_to_commit:
            return

        self.datastore.import_event(
            self.index_name, self.event_type, event_id=self.event_id,
            event=event_to_commit)
        self.updated_event = {}
def commit ( self , event_dict = None ) : if event_dict : event_to_commit = event_dict else : event_to_commit = self . updated_event if not event_to_commit : return self . datastore . import_event ( self . index_name , self . event_type , event_id = self . event_id , event = event_to_commit ) self . updated_event = { }