|
1 | 1 | use std::collections::HashMap; |
2 | 2 |
|
3 | 3 | use crate::{ |
4 | | - DISTRICTS_PER_WAREHOUSE, District, Item, OrderLine, Stock, TAX_SCALE, WarehouseId, district, find_customer_by_id, find_district, find_stock, find_warehouse, item, order_line, pack_order_key, remote::{call_remote_reducer, remote_warehouse_home, simulate_remote_call}, stock |
| 4 | + district, find_customer_by_id, find_district, find_stock, find_warehouse, item, order_line, pack_order_key, |
| 5 | + remote::{remote_warehouse_home, simulate_remote_call}, |
| 6 | + stock, District, Item, OrderLine, Stock, WarehouseId, DISTRICTS_PER_WAREHOUSE, TAX_SCALE, |
5 | 7 | }; |
6 | 8 | use spacetimedb::{log_stopwatch::LogStopwatch, reducer, Identity, ReducerContext, SpacetimeType, Table, Timestamp}; |
7 | 9 |
|
@@ -181,19 +183,19 @@ fn call_remote_order_multiple_items_and_decrement_stock( |
181 | 183 | remote_database_identity: Identity, |
182 | 184 | input: OrderMultipleItemsInput, |
183 | 185 | ) -> Result<Vec<OrderItemOutput>, String> { |
184 | | - call_remote_reducer( |
185 | | - ctx, |
186 | | - remote_database_identity, |
187 | | - "order_multiple_items_and_decrement_stocks", |
188 | | - &input, |
189 | | - ) |
190 | | - // simulate_remote_call( |
| 186 | + // call_remote_reducer( |
191 | 187 | // ctx, |
192 | 188 | // remote_database_identity, |
193 | 189 | // "order_multiple_items_and_decrement_stocks", |
194 | 190 | // &input, |
195 | | - // )?; |
196 | | - //Ok(simulated_remote_order_outputs(input)) |
| 191 | + // ) |
| 192 | + simulate_remote_call( |
| 193 | + ctx, |
| 194 | + remote_database_identity, |
| 195 | + "order_multiple_items_and_decrement_stocks", |
| 196 | + &input, |
| 197 | + )?; |
| 198 | + Ok(simulated_remote_order_outputs(input)) |
197 | 199 | } |
198 | 200 |
|
199 | 201 | struct ProcessedNewOrderItem { |
|
0 commit comments