Module Expr Str ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign SubscriptStore NameLoad Index Str Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body While NameLoad body TryExcept body Return Call NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareNotIn Str Call NameLoad NameLoad body Raise Expr Call NameLoad Num decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Return Call AttributeLoad NameLoad attr Lambda arguments args defaults Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Lambda arguments args defaults Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad GeneratorExp TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index NameLoad comprehension TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Assign NameStore BinOpMod Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If CompareEq NameLoad AttributeLoad NameLoad attr body Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Num Assign NameStore Num With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr Str TupleLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Return ListComp NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return UnaryOpNot BoolOpOr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Num With Call AttributeLoad NameLoad attr NameStore body For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr NameStore body Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str FunctionDef arguments args defaults body With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpMod Call NameLoad Str Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list TryExcept body With Call NameLoad NameLoad Str NameStore body Expr Yield NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad NameLoad Raise orelse Expr Call NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad Str NameStore body Expr Yield NameLoad Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str TryFinally body TryExcept body Expr Yield NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Assign NameStore BinOpMod Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr finalbody Expr Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpMod Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpMod Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpMod Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str With Call NameLoad NameLoad Str NameStore body Pass Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Return ListComp NameLoad comprehension TupleStore NameStore NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If BoolOpAnd CompareNotEq NameLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Yield NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad decorator_list
N/A N/A 
Cache driver that uses SQLite to store information about cached images
 __future__ absolute_import contextlib contextmanager N/A datetime N/A itertools N/A logging N/A os N/A stat N/A time eventlet sleep timeout N/A sqlite3 glance.common cfg glance.common exception glance.image_cache.drivers base N/A logger N/A N/A logging getLogger __name__ N/A DEFAULT_SQL_CALL_TIMEOUT 2 SqliteConnection N/A N/A sqlite3 Connection N/A N/A 
    SQLite DB Connection handler that plays well with eventlet,
    slightly modified from Swift's similar code.
     __init__ N/A N/A self N/A args kwargs N/A N/A N/A self timeout_seconds N/A N/A kwargs get timeout DEFAULT_SQL_CALL_TIMEOUT N/A N/A kwargs N/A timeout 0 N/A N/A N/A N/A sqlite3 Connection __init__ self args kwargs N/A _timeout N/A N/A self call N/A N/A N/A N/A N/A timeout Timeout N/A self timeout_seconds N/A N/A True N/A N/A N/A N/A N/A call N/A N/A N/A N/A sqlite3 OperationalError N/A e N/A N/A N/A locked N/A str e N/A N/A N/A N/A sleep 0.05 N/A execute N/A N/A self N/A args kwargs N/A N/A N/A N/A self _timeout N/A N/A N/A N/A N/A N/A N/A sqlite3 Connection execute self args kwargs N/A commit N/A N/A self N/A N/A N/A N/A N/A self _timeout N/A N/A N/A N/A N/A N/A N/A sqlite3 Connection commit self N/A N/A dict_factory N/A N/A cur row N/A N/A N/A N/A dict N/A N/A N/A col N/A 0 N/A row N/A idx N/A N/A idx col N/A enumerate N/A cur description N/A Driver N/A N/A base Driver N/A N/A 
    Cache driver that uses xattr file tags and requires a filesystem
    that has atimes set.
     N/A opts N/A N/A N/A cfg StrOpt image_cache_sqlite_db default cache.db configure N/A N/A self N/A N/A N/A 
        Configure the driver to use the stored configuration options
        Any store that needs special configuration should implement
        this method. If the store was not able to successfully configure
        itself, it should raise `exception.BadDriverConfiguration`
         N/A N/A N/A N/A super Driver self configure N/A N/A N/A N/A self conf register_opts N/A self opts N/A N/A N/A self initialize_db N/A initialize_db N/A N/A self N/A N/A N/A db N/A N/A self conf image_cache_sqlite_db N/A N/A self db_path N/A N/A N/A os path join N/A self base_dir db N/A N/A N/A conn N/A N/A sqlite3 connect N/A self db_path check_same_thread False factory SqliteConnection N/A N/A N/A conn executescript 
                CREATE TABLE IF NOT EXISTS cached_images (
                    image_id TEXT PRIMARY KEY,
                    last_accessed REAL DEFAULT 0.0,
                    last_modified REAL DEFAULT 0.0,
                    size INTEGER DEFAULT 0,
                    hits INTEGER DEFAULT 0,
                    checksum TEXT
                );
             N/A N/A N/A conn close N/A N/A N/A N/A sqlite3 DatabaseError N/A e N/A N/A msg N/A N/A _ Failed to initialize the image cache database. Got error: %s e N/A N/A N/A logger error msg N/A N/A N/A exception BadDriverConfiguration driver_name sqlite reason msg N/A get_cache_size N/A N/A self N/A N/A N/A 
        Returns the total size in bytes of the image cache.
         N/A sizes N/A N/A path N/A N/A self get_cache_files N/A self base_dir N/A N/A N/A path N/A self db_path N/A N/A N/A file_info N/A N/A os stat path N/A N/A N/A sizes append N/A file_info N/A N/A stat ST_SIZE N/A N/A sum sizes N/A get_hit_count N/A N/A self image_id N/A N/A N/A 
        Return the number of hits that an image has.

        :param image_id: Opaque image identifier
         N/A N/A N/A N/A self is_cached image_id N/A N/A 0 N/A hits 0 N/A N/A N/A self get_db db N/A N/A cur N/A N/A db execute SELECT hits FROM cached_images
                             WHERE image_id = ? N/A image_id N/A hits N/A N/A N/A cur fetchone N/A 0 N/A hits N/A get_cached_images N/A N/A self N/A N/A N/A 
        Returns a list of records about cached images.
         N/A N/A N/A logger debug N/A _ Gathering cached image entries. N/A N/A N/A self get_db db N/A N/A cur N/A N/A db execute SELECT
                             image_id, hits, last_accessed, last_modified, size
                             FROM cached_images
                             ORDER BY image_id N/A N/A cur row_factory dict_factory N/A N/A r N/A r cur N/A is_cached N/A N/A self image_id N/A N/A N/A 
        Returns True if the image with the supplied ID has its image
        file cached.

        :param image_id: Image ID
         N/A N/A N/A N/A os path exists N/A N/A self get_image_filepath image_id N/A is_cacheable N/A N/A self image_id N/A N/A N/A 
        Returns True if the image with the supplied ID can have its
        image file cached, False otherwise.

        :param image_id: Image ID
         N/A N/A N/A N/A N/A self is_cached image_id N/A N/A self is_being_cached image_id N/A is_being_cached N/A N/A self image_id N/A N/A N/A 
        Returns True if the image with supplied id is currently
        in the process of having its image file cached.

        :param image_id: Image ID
         N/A path N/A N/A self get_image_filepath image_id incomplete N/A N/A N/A N/A os path exists path N/A is_queued N/A N/A self image_id N/A N/A N/A 
        Returns True if the image identifier is in our cache queue.

        :param image_id: Image ID
         N/A path N/A N/A self get_image_filepath image_id queue N/A N/A N/A N/A os path exists path N/A delete_all_cached_images N/A N/A self N/A N/A N/A 
        Removes all cached image files and any attributes about the images
         N/A deleted 0 N/A N/A N/A self get_db db N/A N/A path N/A N/A self get_cache_files N/A self base_dir N/A N/A N/A delete_cached_file path N/A deleted 1 N/A N/A N/A db execute DELETE FROM cached_images N/A N/A N/A db commit N/A deleted N/A delete_cached_image N/A N/A self image_id N/A N/A N/A 
        Removes a specific cached image file and any attributes about the image

        :param image_id: Image ID
         N/A path N/A N/A self get_image_filepath image_id N/A N/A N/A self get_db db N/A N/A N/A delete_cached_file path N/A N/A N/A db execute DELETE FROM cached_images WHERE image_id = ? N/A image_id N/A N/A N/A db commit N/A delete_all_queued_images N/A N/A self N/A N/A N/A 
        Removes all queued image files and any attributes about the images
         N/A files N/A f N/A f N/A N/A self get_cache_files N/A self queue_dir N/A file files N/A N/A N/A N/A os unlink file N/A N/A len files N/A delete_queued_image N/A N/A self image_id N/A N/A N/A 
        Removes a specific queued image file and any attributes about the image

        :param image_id: Image ID
         N/A path N/A N/A self get_image_filepath image_id queue N/A N/A N/A N/A os path exists path N/A N/A N/A N/A os unlink path N/A clean N/A N/A self stall_time N/A None N/A N/A 
        Delete any image files in the invalid directory and any
        files in the incomplete directory that are older than a
        configurable amount of time.
         N/A N/A N/A self delete_invalid_files N/A N/A stall_time None N/A N/A stall_time N/A N/A self conf image_cache_stall_time N/A now N/A N/A time time N/A older_than N/A now stall_time N/A N/A N/A self delete_stalled_files older_than N/A get_least_recently_accessed N/A N/A self N/A N/A N/A 
        Return a tuple containing the image_id and size of the least recently
        accessed cached file, or None if no cached files.
         N/A N/A N/A self get_db db N/A N/A cur N/A N/A db execute SELECT image_id FROM cached_images
                             ORDER BY last_accessed LIMIT 1 N/A image_id N/A N/A N/A cur fetchone N/A 0 N/A path N/A N/A self get_image_filepath image_id N/A file_info N/A N/A os stat path N/A N/A image_id N/A file_info N/A N/A stat ST_SIZE N/A open_for_write N/A N/A self image_id N/A N/A N/A 
        Open a file for writing the image file for an image
        with supplied identifier.

        :param image_id: Image ID
         N/A incomplete_path N/A N/A self get_image_filepath image_id incomplete commit N/A N/A N/A N/A N/A N/A N/A self get_db db N/A N/A final_path N/A N/A self get_image_filepath image_id N/A N/A N/A logger debug N/A _ Fetch finished, moving '%(incomplete_path)s' to '%(final_path)s' N/A dict incomplete_path incomplete_path final_path final_path N/A N/A N/A os rename incomplete_path final_path N/A N/A N/A self is_queued image_id N/A N/A N/A N/A os unlink N/A N/A self get_image_filepath image_id queue N/A filesize N/A N/A N/A os path getsize final_path N/A now N/A N/A time time N/A N/A N/A db execute INSERT INTO cached_images
                           (image_id, last_accessed, last_modified, hits, size)
                           VALUES (?, 0, ?, 0, ?) N/A image_id now filesize N/A N/A N/A db commit N/A rollback N/A N/A e N/A N/A N/A N/A N/A self get_db db N/A N/A N/A N/A N/A os path exists incomplete_path N/A N/A invalid_path N/A N/A self get_image_filepath image_id invalid N/A N/A N/A logger debug N/A N/A _ Fetch of cache file failed, rolling back by moving '%(incomplete_path)s' to '%(invalid_path)s' N/A locals N/A N/A N/A os rename incomplete_path invalid_path N/A N/A N/A db execute DELETE FROM cached_images
                           WHERE image_id = ? N/A image_id N/A N/A N/A db commit N/A N/A N/A N/A N/A open incomplete_path wb cache_file N/A N/A N/A cache_file N/A N/A N/A Exception N/A e N/A N/A N/A rollback e N/A N/A N/A N/A commit N/A contextmanager open_for_read N/A N/A self image_id N/A N/A N/A 
        Open and yield file for reading the image file for an image
        with supplied identifier.

        :param image_id: Image ID
         N/A path N/A N/A self get_image_filepath image_id N/A N/A open path rb cache_file N/A N/A N/A cache_file N/A now N/A N/A time time N/A N/A N/A self get_db db N/A N/A N/A N/A db execute UPDATE cached_images
                       SET hits = hits + 1, last_accessed = ?
                       WHERE image_id = ? N/A now image_id N/A N/A N/A db commit N/A contextmanager get_db N/A N/A self N/A N/A N/A 
        Returns a context manager that produces a database connection that
        self-closes and calls rollback if an error occurs while using the
        database connection
         N/A conn N/A N/A sqlite3 connect N/A self db_path check_same_thread False factory SqliteConnection N/A N/A conn row_factory N/A sqlite3 Row N/A N/A conn text_factory str N/A N/A N/A conn execute PRAGMA synchronous = NORMAL N/A N/A N/A conn execute PRAGMA count_changes = OFF N/A N/A N/A conn execute PRAGMA temp_store = MEMORY N/A N/A N/A N/A N/A N/A conn N/A N/A N/A N/A sqlite3 DatabaseError N/A e N/A N/A msg N/A N/A _ Error executing SQLite call. Got error: %s e N/A N/A N/A logger error msg N/A N/A N/A conn rollback N/A N/A N/A N/A conn close N/A contextmanager queue_image N/A N/A self image_id N/A N/A N/A 
        This adds a image to be cache to the queue.

        If the image already exists in the queue or has already been
        cached, we return False, True otherwise

        :param image_id: Image ID
         N/A N/A N/A self is_cached image_id N/A N/A msg N/A N/A _ Not queueing image '%s'. Already cached. image_id N/A N/A N/A logger warn msg N/A False N/A N/A N/A self is_being_cached image_id N/A N/A msg N/A N/A _ Not queueing image '%s'. Already being written to cache image_id N/A N/A N/A logger warn msg N/A False N/A N/A N/A self is_queued image_id N/A N/A msg N/A N/A _ Not queueing image '%s'. Already queued. image_id N/A N/A N/A logger warn msg N/A False N/A path N/A N/A self get_image_filepath image_id queue N/A N/A open path w f N/A N/A N/A True N/A delete_invalid_files N/A N/A self N/A N/A N/A 
        Removes any invalid cache entries
         N/A path N/A N/A self get_cache_files N/A self invalid_dir N/A N/A N/A N/A os unlink path N/A N/A N/A logger info Removed invalid cache file %s path N/A delete_stalled_files N/A N/A self older_than N/A N/A N/A 
        Removes any incomplete cache entries older than a
        supplied modified time.

        :param older_than: Files written to on or before this timestemp
                           will be deleted.
         N/A path N/A N/A self get_cache_files N/A self incomplete_dir N/A N/A N/A N/A os unlink path N/A N/A N/A logger info Removed stalled cache file %s path N/A get_queued_images N/A N/A self N/A N/A N/A 
        Returns a list of image IDs that are in the queue. The
        list should be sorted by the time the image ID was inserted
        into the queue.
         N/A files N/A f N/A f N/A N/A self get_cache_files N/A self queue_dir N/A items N/A N/A path files N/A N/A mtime N/A N/A N/A os path getmtime path N/A N/A N/A items append N/A mtime N/A N/A N/A os path basename path N/A N/A N/A items sort N/A N/A image_id N/A N/A mtime image_id items N/A get_cache_files N/A N/A self basepath N/A N/A N/A 
        Returns cache files in the supplied directory

        :param basepath: Directory to look in for cache files
         N/A fname N/A N/A os listdir basepath N/A N/A path N/A N/A N/A os path join basepath fname N/A N/A N/A path N/A self db_path N/A N/A N/A os path isfile path N/A N/A N/A path N/A N/A delete_cached_file N/A N/A path N/A N/A N/A N/A N/A N/A os path exists path N/A N/A N/A N/A logger debug N/A _ Deleting image cache file '%s' path N/A N/A N/A os unlink path N/A N/A N/A N/A logger warn N/A _ Cached image file '%s' doesn't exist, unable to delete path N/A