Carrier bills
finalize_upload()
async
Finalize the upload process. Once all batches are uploaded, merge them once with the existing data in LakeFS, store the result, and clear the accumulator.
Returns:
| Name | Type | Description |
|---|---|---|
message |
str
|
A message indicating the number of shipments processed. |
lakefs_path |
str
|
The path to the merged data in LakeFS. |
records_processed |
int
|
The number of records processed. |
existing_records |
int
|
The number of existing records in LakeFS. |
total_records |
int
|
The total number of records in LakeFS. |
Source code in mycxo/boxtalk/routes/api/carrier_bills/route.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
upload_shipments(data)
async
Append the received shipments to our global in-memory list. No immediate merge with LakeFS — we do that once in finalize_upload.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
ShipmentUpload
|
Shipment Upload Model |
required |
shipments
|
List[Shipment]
|
The shipments to append to the accumulator. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
message |
str
|
A message indicating the number of shipments received. |
total_accumulated |
int
|
The total number of shipments accumulated so far. |
Source code in mycxo/boxtalk/routes/api/carrier_bills/route.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |