Commit Graph

22 Commits

Author SHA1 Message Date
psychedelicious
b98c9b516a feat: add batch docstrings 2023-08-21 19:51:16 +10:00
Brandon Rising
137fbacb92 Fix flake8 2023-08-18 15:47:27 -04:00
Brandon Rising
3e26214b83 Add a few more endpoints for managing batches 2023-08-18 15:38:16 -04:00
Brandon Rising
0282f46c71 Add runs field for running the same batch multiple times 2023-08-18 13:41:07 -04:00
Brandon Rising
99e03fe92e Run unmodified graph if no batch data is provided 2023-08-18 13:33:09 -04:00
Brandon Rising
cb65526880 More session not found handling 2023-08-17 14:23:12 -04:00
psychedelicious
59bc9ed399 fix(backend): handle BatchSessionNotFoundException in BatchManager._process()
The internal `BatchProcessStorage.get_session()` method throws when it finds nothing, but we were not catching any exceptions.

This caused a exception when the batch manager handles a `graph_execution_state_complete` event that did not originate from a batch.

Fixed by handling the exception.
2023-08-17 13:58:11 +10:00
psychedelicious
cc3c2756bd feat(backend): rename batch changes variable
`updateSession` -> `changes`
2023-08-17 13:32:32 +10:00
psychedelicious
c5b963f1a6 fix(backend): typo
`relavent` -> `relevant`
2023-08-17 12:47:58 +10:00
psychedelicious
4d2dd6bb10 feat(backend): rename BatchManager.process to _process
Just to make it clear that this is not a method on the ABC.
2023-08-17 12:47:05 +10:00
psychedelicious
7e4beab4ff feat(backend): surface BatchSessionNodeFoundException
Catch this exception in the router and return an appropriate `HTTPException`.
2023-08-17 12:45:32 +10:00
psychedelicious
5bec64d65b fix(backend): fix typings in batch_manager.py
- `batch_indicies` is `tuple[int]` not `list[int]`
- explicit `None` return values
2023-08-17 12:07:20 +10:00
psychedelicious
8cf9bd47b2 chore(backend): remove unnecessary batch validation function
The `Batch` model is fully validated by pydantic on instantiation; we do not need any validation logic for it.
2023-08-17 11:59:47 +10:00
Brandon Rising
796ff34c8a Testing out Spencer's batch data structure 2023-08-16 15:21:11 -04:00
Brandon Rising
15e7ca1baa Break apart create/start logic 2023-08-15 16:28:47 -04:00
Brandon Rising
f8d8b16267 Run python black 2023-08-14 11:01:31 -04:00
Brandon Rising
1debc31e3d Allow cancel of running batch 2023-08-11 15:52:49 -04:00
Brandon Rising
1d798d4119 Return session id's on batch creation 2023-08-11 11:45:27 -04:00
Brandon Rising
e751f7d815 More testing 2023-08-10 14:09:00 -04:00
Brandon Rising
e26e4740b3 Testing sqlite issues with batch_manager 2023-08-10 11:38:28 -04:00
Brandon Rising
a61685696f Run black formatting 2023-08-01 16:41:40 -04:00
Brandon Rising
55b921818d Create batch manager 2023-07-31 15:45:35 -04:00