Skip to content

Commit

Permalink
Merge pull request #553 from negillett/25394
Browse files Browse the repository at this point in the history
Await dir availability while iterating StagedSource [RHELDST-25394]
  • Loading branch information
negillett authored Aug 7, 2024
2 parents a4a93a9 + 2a31ed5 commit f9f02cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pushsource/_impl/backend/staged/staged_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from ...source import Source
from ...model import DirectoryPushItem
from ...helpers import list_argument, as_completed_with_timeout_reset
from ...helpers import list_argument, as_completed_with_timeout_reset, wait_exist

from .staged_utils import StagingMetadata, StagingLeafDir
from .staged_ami import StagedAmiMixin
Expand Down Expand Up @@ -134,6 +134,11 @@ def _push_items_for_leafdir(self, leafdir, metadata):
def _push_items_for_topdir(self, topdir):
LOG.info("Checking files in: %s", topdir)

# wait for path availability
timeout = int(os.getenv("PUSHSOURCE_SRC_POLL_TIMEOUT") or "0")
poll_rate = int(os.getenv("PUSHSOURCE_SRC_POLL_RATE") or "30")
wait_exist(topdir, timeout, poll_rate)

metadata = self._load_metadata(topdir)

destdirs = []
Expand Down

0 comments on commit f9f02cd

Please sign in to comment.