librephotos icon indicating copy to clipboard operation
librephotos copied to clipboard

How to gracefully stop a "generate event albums"

Open ippocratis opened this issue 1 year ago • 1 comments

What Operating system and version is LibrePhotos running on:

Manjaro arm

What architecture is LibrePhotos running on:

ARM64

How is LibrePhotos installed:

Docker

If running via Docker or Kubernetes please list version including docker-compose:

2.6.1

Are you running LibrePhotos on a virtual machine if so please list:

no

How is you picture library mounted on the host (or in the virtual machine):

Local file system

Description of issue:

Wanted to try the "event albums". Proccess took to long and stoped it from the webui in the admin area from the worker logs. Realised from top that Python and gunicorn kept running consumming ~100% each From their pid I verified the running proccess ps -ef shows the the Python pid is running manage.py rqworker default and the gunicorn is running /usr/bin/python3 /usr/local/bin/gunicorn --worker-class=gevent --timeout 3600 --bind 0.0.0.0:8001 --log-level=info ownphotos.wsgi

How can we reproduce it:

Start an "event albums" job from the library in the webui then stop it from the worker logs in the admin page. Then monitor top and ps -ef

Additional Information:

I can kill those running proccess from terminal but shouldn't make sense if stopping a job from the worker logs in the admin page actually shooing the job and not just remove the log? Or maybe some other way included in the web ui to stop unfinished jobs gracefully? Thanks

ippocratis avatar Jul 28 '22 19:07 ippocratis

This should be fixed in dev now. We had an infinite loop, and it did not work in a background worker, but an API worker instead.

derneuere avatar Aug 08 '22 11:08 derneuere

Stopping jobs is an enhancement, which we track here #135

derneuere avatar Aug 11 '22 10:08 derneuere