Uses the filelock lib so that we only have one instance running at a time
To test:
Activate your virtual env
pip install -r requirements.txt
Run PYTHONPATH=src python -m wacks4shop.wack --dry in one terminal. It can be helpful to comment out the main functionality and instead put a time.sleep(30) instead
Run it again in another terminal
The second instance should say it couldn't grab the lock and exit
Another way to sort out https://github.com/allisonking/wacks-by-warby/issues/12
Uses the filelock lib so that we only have one instance running at a time
To test:
pip install -r requirements.txt
PYTHONPATH=src python -m wacks4shop.wack --dry
in one terminal. It can be helpful to comment out the main functionality and instead put atime.sleep(30)
instead