diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-12-06 04:27:32 +0800 |
---|---|---|
committer | Jake Ellowitz <wakkadojo@users.noreply.github.com> | 2018-12-06 04:27:32 +0800 |
commit | 08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c (patch) | |
tree | 45d5f6e51f11543a2f823f976e75b0b0704f17de /packages/pipeline/src/scripts | |
parent | b2dd5495bcf13a9ea71498b5def12c75589b0156 (diff) | |
download | dexon-sol-tools-08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c.tar dexon-sol-tools-08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c.tar.gz dexon-sol-tools-08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c.tar.bz2 dexon-sol-tools-08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c.tar.lz dexon-sol-tools-08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c.tar.xz dexon-sol-tools-08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c.tar.zst dexon-sol-tools-08eb0b91b6d0f0dc90ae920a18ca5dd080bf235c.zip |
Fix RadarRelay timestamps (#1391)
* Fixing rr timestamps
* Apply prettier
Diffstat (limited to 'packages/pipeline/src/scripts')
-rw-r--r-- | packages/pipeline/src/scripts/pull_radar_relay_orders.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts b/packages/pipeline/src/scripts/pull_radar_relay_orders.ts index 6c18bcaef..40bb6fc97 100644 --- a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts +++ b/packages/pipeline/src/scripts/pull_radar_relay_orders.ts @@ -33,11 +33,12 @@ async function getOrderbookAsync(): Promise<void> { // Save all the orders and update the observed time stamps in a single // transaction. console.log('Saving orders and updating timestamps...'); + const observedTimestamp = Date.now(); await connection.transaction(async (manager: EntityManager): Promise<void> => { for (const order of orders) { await manager.save(SraOrder, order); - const observedTimestamp = createObservedTimestampForOrder(order); - await manager.save(observedTimestamp); + const orderObservation = createObservedTimestampForOrder(order, observedTimestamp); + await manager.save(orderObservation); } }); } |