glance/glance/image_cache
Abhishek Kekane 9b385f7b67 [uwsgi] Add missing pefetch periodic job
Glance was not supporting uwsgi deployment when we added periodic job
to prefetch images into cache. Later in ussuri uwsgi support was added
but we missed to implement periodic job to pre-cache the image.

This patch add this support for glance + uwsgi. For WSGI, we run the
prefetcher with an external lock, which makes sure that multiple API
workers will not attempt to cache an image at the same time. In this
case, if multiple workers attempt to run at the same time, only one
will grab the lock and do the work. When completed, the other worker
will grab the lock and either find all the work completed, or complete
new work that has been queued since the first one started.

Closes-Bug: #1939307
Co-Authored-By: Dan Smith <dms@danplanet.com>
Change-Id: I2abd1e60f414fbd68ce84e0b280f8b3e4e791a82
2021-09-08 11:05:57 -07:00
..
drivers Stop to use the __future__ module. 2020-06-02 20:14:31 +02:00
__init__.py Replace md5 with oslo version 2020-12-15 10:43:19 -05:00
base.py Remove vim header 2014-01-14 16:03:28 +00:00
cleaner.py Remove vim header 2014-01-14 16:03:28 +00:00
client.py Add cache-manage utility using v2 API 2019-02-27 06:43:13 +00:00
prefetcher.py [uwsgi] Add missing pefetch periodic job 2021-09-08 11:05:57 -07:00
pruner.py Remove vim header 2014-01-14 16:03:28 +00:00