-
Notifications
You must be signed in to change notification settings - Fork 26
Add asynchronous data block processing #1491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
First attempt export as ELN
Use APScheduler Use APScheduler Use APScheduler Use APScheduler Use APScheduler Use APScheduler
Co-authored-by: Matthew Evans <git@ml-evs.science>
Co-authored-by: Matthew Evans <git@ml-evs.science> Co-authored-by: Diana Aliabieva <dianaaliabieva@Dianas-MacBook-Pro.local>
First attempt to sample ELN export button
Add itemGraph in ExportModal and depth control for related items Add itemGraph in ExportModal and depth control for related items Use slider to control itemGraph depth Add cypress component tests Add cypress component tests Add cypress component tests Add cypress component tests Add cypress component tests Add cypress component tests
Add asynchronous data block processing with APScheduler Add asynchronous data block processing with APScheduler
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1491 +/- ##
==========================================
- Coverage 79.13% 77.77% -1.36%
==========================================
Files 70 74 +4
Lines 5219 5567 +348
==========================================
+ Hits 4130 4330 +200
- Misses 1089 1237 +148
🚀 New features to boost your workflow:
|
datalab
|
||||||||||||||||||||||||||||
| Project |
datalab
|
| Branch Review |
bc/async-block
|
| Run status |
|
| Run duration | 08m 48s |
| Commit |
|
| Committer | Ben Charmes |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
458
|
| View all changes introduced in this branch ↗︎ | |
ml-evs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excited to try this @BenjaminCharmes! Let me know when you think its ready to play around with! I would suggest also extending the CanaryBlock to make an async version we can use in testing.
c58fcc8 to
0944578
Compare
| @@ -0,0 +1,43 @@ | |||
| from datetime import datetime, timezone | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we combine the block tasks and export task models and MongoDB collection?
Closes #1469
Linked to Add prefers_async flag to insitu blocks #76
Summary
Implements asynchronous data block processing using APScheduler for computationally intensive blocks, with a unified task management system for all async operations.
Changes
Backend
Task Management Refactoring:
BlockTaskandExportTaskmodelstasksMongoDB collection withtypefield to distinguish export vs block processing tasksTaskStatusreplacesExportStatusandBlockProcessingStatusAsync Block Processing:
update_block()to support async processing viaprefers_asyncattribute/blocks/<task_id>/statusendpoint for status polling, including stage historyFrontend
pollBlockStatus()to poll task status every 2 secondsupdateBlockFromServer()to handle async responsesImplementation Details
prefers_async = Trueto enable async processingtrigger_async: trueinevent_datawhen ready to processbokeh_plot_datais regenerated on-demand viablock.to_web()in status endpoint