Commit Graph

18 Commits

Author SHA1 Message Date
Brett Williams b7ba1201e4 refactor: log silent AttributeError catches, add _sync_class to remaining services, drop dead ctx slot 2026-06-05 21:27:02 -05:00
Brett Williams 552c791207 refactor: wire all services through ApplicationContext
- Created src/application_context.py as DI container with TYPE_CHECKING imports
- server.py now instantiates all services in dependency order via ApplicationContext
- Fixed infinite recursion bug: 48 instance methods renamed with underscore prefix
  to avoid shadowing by same-named @classmethod forwarders
- ZeroconfServer: instantiate Zeroconf() in __init__, add _sync_class() to
  configure forwarder, direct _configure/_start calls during wiring
- Config, EngineManager, PreviewManager: all forwarders and _sync_class() intact
- RenderQueue: load_state and subscribe moved to __init__, threading.Lock retained
- DistributedJobManager: subscribe_to_listener moved to __init__
2026-06-05 05:34:32 -05:00
brett 74dce5cc3d Windows path fixes (#129)
* Change uses of os.path to use Pathlib

* Add return types and type hints

* Add more docstrings

* Add missing import to api_server
2026-01-18 00:18:43 -06:00
brett daf445ee9e Rename renderers to engines (#123)
* Bulk rename
* Fix build issues
2025-12-27 18:53:09 -06:00
brett af6d6e1525 Document all the things! (#117)
Add lots of docstrings everywhere
2024-08-23 19:26:05 -05:00
brett 51a5a63944 Use pubsub messages instead of a background thread to process changes (#92)
* Use pubsub messages instead of a background thread to process changes to the RenderQueue

* Misc logging improvements
2024-08-08 23:01:26 -05:00
brett 3600eeb21b Refactor: Move all initialization logic out of api_server and into init (#91)
* Zeroconf logging improvements

* Ignore RuntimeErrors in background threads - Prevents issues during shutdown

* Migrate start up code from api_server.py to init.py

* Add error handlers to the API server to handle detached instances

* Integrate RenderQueue eval loop into RenderQueue object

* Silently catch RuntimeErrors on evaluate_queue

* Stop background queue updates in prepare_for_shutdown
2024-08-08 04:47:22 -05:00
brett 1cdb7810bf New PreviewManager to handle generating previews asynchronously (#86)
* Add PreviewManager

* Refactoring and better error handling

* Integrate PreviewManager into api_server.py

* Integrate PreviewManager into distributed_job_manager.py

* Add method to preview_manager.py to delete previews and integrate it into api_server

* Misc logging improvements

* Misc code cleanup

* Replace existing preview on job completion - Minor code fixes
2024-08-04 16:45:46 -05:00
brett 21de69ca4f Improve performance on several API calls (#80)
* Streamline fetching renderer_info from API - use threading for performance improvements

* Use concurrent.futures instead of Threading

* Fix timeout issue with server proxy

* Minor fixes to code that handles proxy server online / offline status
2024-08-03 11:02:40 -05:00
brett 8a3e74660c Create subjobs after submission - #54 (#79)
* Force start in render queue only starts NOT_STARTED and SCHEDULED jobs

* Refactor adding jobs / subjobs

* Remove dead code

* Fixed issue with bulk job submission

* Cancel job now cancels all subjobs

* Misc fixes

* JSON now returns job hostname

* Add hostname as optional column in DB

* Misc fixes

* Error handling for removing zip file after download

* Clean up imports

* Fixed issue where worker child information would not be saved
2024-07-30 19:22:38 -05:00
Brett Williams 0e0eba7b22 Close the session properly - part 2 2023-11-11 10:59:39 -06:00
Brett Williams 22aaa82da7 Simplify database.db logic 2023-10-27 02:41:31 -05:00
Brett Williams 951bebb3a8 Save database.db to upload dir, not code dir 2023-10-27 02:35:21 -05:00
brett cc1cf92118 Add simple notifications on job errors, completion and start. (#46) 2023-10-25 06:15:52 -05:00
Brett Williams 9027cd7202 More code re-organizing 2023-10-21 22:45:30 -05:00
brett 7a52cce40a Windows File Path Fixes (#39)
* Added system_safe_path to convert paths to Windows

* Fix issue where engines would not be reported unless a system engine was installed

* Platform independent searching for binaries in engine directory

* Add missing package to requirements.txt

* Better error handling for ffmpeg.get_all_formats()

* Add system_safe_path to more locations in api_server.py

* Fix naming issue with Blender on macos

* Fix path lookups and add engine_path to workers

* Report installed renderers in status

* Remove files included by accident
2023-10-21 22:12:09 -05:00
brett 7d1ecf1fa5 Downloadable engines (#34)
* Add blender_downloader.py

* Add engine_manager.py

* Add additional methods to engine_manager.py

* Refactor file layout to make engines on par with workers

* Add system platform info to status response

* Default to using system platform / cpu if none are provided

* Add API to download an engine and some general cleanup

* Add method to delete downloaded engine

* Add API calls to download engines and delete downloads

* Misc fixes
2023-10-20 15:05:29 -05:00
brett a475aa999a Major file reorganization (#26)
* Major file reorganization

* Rearrange imports

* Fix default log level
2023-06-30 21:24:40 -05:00