Multiple execution of felicette fails, and the generated images are incorrect
if we try to run process in two terminal one of them process is " killed" error and image quality for zooming not god
Hi @whiteglobe , thanks for pointing it out. I just cross-checked and could reproduce this issue.
A temporary fix for this is to restrict number of running 'felicette' processes to 1 using a simple file-based lock
I understood the solution you're asking to implement, but where exactly do we implement this in the code-base?
Hi @Abhijnan-Bajpai , acquire the file-lock here, and release the file-lock here, and here (since CLI can exit this way as well).
The util functions to create/remove a file-lock should be in felicette/sys_utils.py. Is that clear, do you need more help?
Here are some pointers
- https://stackoverflow.com/questions/12231733/allow-only-one-instance-of-python-script
- https://stackoverflow.com/questions/788411/check-to-see-if-python-script-is-running
- https://stackoverflow.com/questions/36799192/check-if-python-script-is-already-running/43370539
Also a suggested filepath for the file-lock would be os.path.join(landsat_item._data["id"], 'lockfile'), since felicette running with 1+ instances on different 'locations' work just fine.