wait_for_file_to_exist#

streaming.base.util.wait_for_file_to_exist(filename, poll_interval, timeout, err_msg)[source]#

Wait for the file to exist till timeout seconds. Raise an Exception after that.

Parameters
  • filename (str) – A file name

  • poll_interval (float) – Number of seconds to wait before next polling

  • timeout (float) – Number of seconds to wait for a file to exist before raising an exception

  • err_msg (str) – Error message description for an exception

Raises

RuntimeError – Raise an Exception if file does not exist after timeout