(
batch_id: uuid.UUID,
*,
import_and_commit: bool = False,
state: str = "SYNCING",
syncs: list[dict],
all_syncs_succeeded: bool | None = None,
error_message: str | None = None,
)
| 16 | |
| 17 | |
| 18 | def _sync_batch_payload( |
| 19 | batch_id: uuid.UUID, |
| 20 | *, |
| 21 | import_and_commit: bool = False, |
| 22 | state: str = "SYNCING", |
| 23 | syncs: list[dict], |
| 24 | all_syncs_succeeded: bool | None = None, |
| 25 | error_message: str | None = None, |
| 26 | ) -> dict: |
| 27 | payload = dict( |
| 28 | id=str(batch_id), |
| 29 | import_and_commit=import_and_commit, |
| 30 | state=state, |
| 31 | syncs=syncs, |
| 32 | ) |
| 33 | if all_syncs_succeeded is not None: |
| 34 | payload["all_syncs_succeeded"] = all_syncs_succeeded |
| 35 | if error_message is not None: |
| 36 | payload["error_message"] = error_message |
| 37 | return payload |
| 38 | |
| 39 | |
| 40 | def _mock_list_repo( |
no outgoing calls
no test coverage detected