huskar_api/models/container/management.py
def vacuum_stale_barriers(cls, huskar_client):
        """Scans stale barriers and deletes them.

        This is an iterator factory. You need to use ``next`` to drive it
        running continually. If you just invoke this method and leave it alone,
        nothing will happen.

        The returned iterator deletes one stale barrier on its each step.

        :param huskar_client: The instance of huskar client.
        :returns: An iterator which generates ``(container_id, is_stale)``
        """
        directory_path = cls._ZPATH_BARRIER_DIRECTORY
        container_ids = huskar_client.client.get_children(directory_path)
        for container_id in sorted(container_ids):
            management = cls(huskar_client, container_id)
            if management.has_barrier():
                yield container_id, False
            else:
                management._unset_barrier()
                yield container_id, True
Scans stale barriers and deletes them.

        This is an iterator factory. You need to use ``next`` to drive it
        running continually. If you just invoke this method and leave it alone,
        nothing will happen.

        The returned iterator deletes one stale barrier on its each step.

        :param huskar_client: The instance of huskar client.
        :returns: An iterator which generates ``(container_id, is_stale)``
        
Scans stale barriers and deletes them.
This is an iterator factory. You need to use ``next`` to drive it
running continually. If you just invoke this method and leave it alone,
nothing will happen.

The returned iterator deletes one stale barrier on its each step.
Scans stale barriers and deletes them . This is an iterator factory . You need to use ` ` next ` ` to drive it running continually . If you just invoke this method and leave it alone nothing will happen . The returned iterator deletes one stale barrier on its each step .
def vacuum_stale_barriers(cls, huskar_client):
        directory_path = cls._ZPATH_BARRIER_DIRECTORY
        container_ids = huskar_client.client.get_children(directory_path)
        for container_id in sorted(container_ids):
            management = cls(huskar_client, container_id)
            if management.has_barrier():
                yield container_id, False
            else:
                management._unset_barrier()
                yield container_id, True
def vacuum_stale_barriers ( cls , huskar_client ) : directory_path = cls . _ZPATH_BARRIER_DIRECTORY container_ids = huskar_client . client . get_children ( directory_path ) for container_id in sorted ( container_ids ) : management = cls ( huskar_client , container_id ) if management . has_barrier ( ) : yield container_id , False else : management . _unset_barrier ( ) yield container_id , True
Scans stale barriers and deletes them.
Scans stale barriers and deletes them .
"""Scans stale barriers and deletes them.

        This is an iterator factory. You need to use ``next`` to drive it
        running continually. If you just invoke this method and leave it alone,
        nothing will happen.

        The returned iterator deletes one stale barrier on its each step.

        :param huskar_client: The instance of huskar client.
        :returns: An iterator which generates ``(container_id, is_stale)``
        """
An iterator which generates ``(container_id, is_stale)``
An iterator which generates ` ` ( container_id is_stale ) ` `
cls
huskar_client
The instance of huskar client.
The instance of huskar client .