Trying again - last thread did not get a response.
Hi, I'm working on a project that monitors log files for keywords (long story short).
This project requires watching for new files created in a directory. The log files are named by date in this format:
start_date = datetime.today().strftime('%Y%m%d')
main_run(start_date)```
I am using `sh` module to follow the files:
```py
# In "main_run" function:
tail_proc = tail("-f", "-n 0", path_1, _iter=False, _out=tail_callback, _bg=True)
tail_proc.wait()```
(I'm probably going to change the structure of the main starting function.)
The script is kept running by the loop, but that means I can't do anything else until I break it. How should I go about watching for a new file (while breaking the loop)?