felicette icon indicating copy to clipboard operation
felicette copied to clipboard

Multiple execution of felicette fails, and the generated images are incorrect

Open whiteglobe opened this issue 5 years ago • 3 comments

if we try to run process in two terminal one of them process is " killed" error and image quality for zooming not god

whiteglobe avatar Jul 27 '20 11:07 whiteglobe

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

plant99 avatar Jul 27 '20 16:07 plant99

I understood the solution you're asking to implement, but where exactly do we implement this in the code-base?

Abhijnan-Bajpai avatar Jul 28 '20 04:07 Abhijnan-Bajpai

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.

plant99 avatar Jul 28 '20 04:07 plant99