mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[PR #408] [CLOSED] Send prints using background dispatcher service #1035
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#1035
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/maziggy/bambuddy/pull/408
Author: @RyanEwen
Created: 2/17/2026
Status: ❌ Closed
Base:
0.2.1b2← Head:feature/backend_queue📝 Commits (9)
b37f32bAdd background print dispatching + tests66d2707Fix conflicting var namefd2dd73Update frontend buildd614115Add background print dispatching + tests8f139bbFix conflicting var nameefde1f3Update frontend build69934d2Merge remote-tracking branch 'origin/feature/backend_queue' into feature/backend_queued49a62cMerge branch '0.2.1b' into feature/backend_queued86d087Revert changes to chunk sizes and timeouts to A1-safe values.📊 Changes
23 files changed (+2229 additions, -485 deletions)
View changed files
📝
backend/app/api/routes/archives.py(+29 -119)➕
backend/app/api/routes/background_dispatch.py(+32 -0)📝
backend/app/api/routes/library.py(+26 -130)📝
backend/app/api/routes/websocket.py(+10 -0)📝
backend/app/main.py(+80 -72)📝
backend/app/schemas/archive.py(+11 -5)📝
backend/app/schemas/library.py(+1 -0)➕
backend/app/services/background_dispatch.py(+857 -0)📝
backend/app/services/bambu_ftp.py(+57 -9)➕
backend/tests/integration/test_background_dispatch_api.py(+243 -0)➕
backend/tests/unit/services/test_background_dispatch.py(+158 -0)📝
frontend/src/api/client.ts(+23 -2)📝
frontend/src/components/PrintModal/index.tsx(+25 -14)📝
frontend/src/contexts/ToastContext.tsx(+440 -11)📝
frontend/src/hooks/useWebSocket.ts(+8 -1)📝
frontend/src/i18n/locales/de.ts(+27 -0)📝
frontend/src/i18n/locales/en.ts(+27 -0)📝
frontend/src/i18n/locales/it.ts(+27 -0)📝
frontend/src/i18n/locales/ja.ts(+26 -0)➕
static/assets/index-C2YsnOJo.css(+1 -0)...and 3 more files
📄 Description
Description
Decouples file uploads and print start commands so that they run in the background asynchronously. When a print is started, the print modal no longer waits for the print to upload and start. Instead, a new toast-based UI appears with the status of prints being dispatched. Prints being dispatched can be cancelled during upload. If cancelled, the partially-uploaded gcode is deleted from the printer automatically before the FTP connection is closed.
This allows users sending particularly large prints to slow printers such as the P1-series to start a print and then move onto another task in Bambuddy immediately (such as starting more prints on more printers). It also gives the user visibility into what's happening instead of a loading indicator appearing for an indefinite period of time.
The new toast-based UI uses websockets to update in real time. It will also appear for other users / instances of Bambuddy, not just the user who started the prints, allowing more transparency and handling cases where the user closes the page and then comes back wanting to know the status of the dispatching.
Related Issue
Fixes https://github.com/maziggy/bambuddy/issues/112
Type of Change
Changes Made
Screenshots
Testing
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.