InvokeAI/invokeai/app/api/routers
Lincoln Stein fbede84405
[feature] Download Queue (#5225)
* add base definition of download manager

* basic functionality working

* add unit tests for download queue

* add documentation and FastAPI route

* fix docs

* add missing test dependency; fix import ordering

* fix file path length checking on windows

* fix ruff check error

* move release() into the __del__ method

* disable testing of stderr messages due to issues with pytest capsys fixture

* fix unsorted imports

* harmonized implementation of start() and stop() calls in download and & install modules

* Update invokeai/app/services/download/download_base.py

Co-authored-by: Ryan Dick <ryanjdick3@gmail.com>

* replace test datadir fixture with tmp_path

* replace DownloadJobBase->DownloadJob in download manager documentation

* make source and dest arguments to download_queue.download() an AnyHttpURL and Path respectively

* fix pydantic typecheck errors in the download unit test

* ruff formatting

* add "job cancelled" as an event rather than an exception

* fix ruff errors

* Update invokeai/app/services/download/download_default.py

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>

* use threading.Event to stop service worker threads; handle unfinished job edge cases

* remove dangling STOP job definition

* fix ruff complaint

* fix ruff check again

* avoid race condition when start() and stop() are called simultaneously from different threads

* avoid race condition in stop() when a job becomes active while shutting down

---------

Co-authored-by: Lincoln Stein <lstein@gmail.com>
Co-authored-by: Ryan Dick <ryanjdick3@gmail.com>
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Co-authored-by: Kent Keirsey <31807370+hipsterusername@users.noreply.github.com>
2023-12-22 12:35:57 -05:00
..
app_info.py Added full-version endpoint (#5206) 2023-12-04 02:57:39 +00:00
board_images.py Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
boards.py feat: refactor services folder/module structure 2023-10-12 12:15:06 -04:00
download_queue.py [feature] Download Queue (#5225) 2023-12-22 12:35:57 -05:00
images.py feat: workflow library (#5148) 2023-12-09 09:48:38 +11:00
model_records.py tag model manager v2 api as unstable 2023-12-17 14:16:45 -05:00
models.py Merge branch 'main' into refactor/model-manager-2 2023-11-14 07:51:57 +11:00
session_queue.py feat: remove enqueue_graph routes/methods (#4922) 2023-10-17 18:00:40 +00:00
sessions.py feat(api): restore get_session route 2023-10-17 14:59:25 +11:00
utilities.py feat(api): chore: pydantic & fastapi upgrade 2023-10-17 14:59:25 +11:00
workflows.py feat: workflow library (#5148) 2023-12-09 09:48:38 +11:00