async def refresh_events(self) -> None:
        """Gathers the last RECENT_EVENTS_BUFFER events from the database and updates the self.recent_events list"""

        started_checking_events = datetime.now(pytz.utc)

        async with self.refresh_lock:
            # print("Refreshing events...")
            data = await (await get_database()).get_recent_events(
                self.world_id, RECENT_EVENTS_BUFFER
            )
            events = [
                Event(
                    id=event["id"],
                    type=EventType(event["type"]),
                    subtype=event["subtype"],
                    description=event["description"],
                    location_id=event["location_id"] if isinstance(event["location_id"], str) else event["location_id"]["id"],
                    agent_id=event["agent_id"],
                    timestamp=datetime.fromisoformat(event["timestamp"]),
                    witness_ids=event["witness_ids"],
                    metadata=event["metadata"],
                )
                for event in data
            ]

            self.recent_events = events
            self.last_refresh = (
                max(
                    datetime.fromisoformat(data[0]["timestamp"]),
                    started_checking_events,
                )
                if len(data) > 0
                else started_checking_events
            )
Gathers the last RECENT_EVENTS_BUFFER events from the database and updates the self.recent_events list
src/event/base.py