watchfiles icon indicating copy to clipboard operation
watchfiles copied to clipboard

[Question] Possible to run multiple watch processes at once?

Open pallavg opened this issue 1 year ago • 0 comments

I want to know if it is possible to run mulltiple watch process in a single script that watches 2 separate directories and runs different callback functions. Something like this:


from watchfiles import run_process

def callback1():
 ....

def callback2():
 ...

def main():
     run_process(dirs1, target=None, callback=callback1, step=30000)
     run_process(dirs2, target=none, callback=callback2, step=500000)
     ...
     run_proccess(....)

Thanks.

pallavg avatar May 22 '24 00:05 pallavg