Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
add elapsed time tag for order fulfillment (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeychr authored Oct 30, 2023
1 parent ed6b517 commit 58e1f1c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
68 changes: 34 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@debridge-finance/dln-taker",
"version": "2.16.4",
"version": "2.16.5",
"description": "DLN executor is the rule-based daemon service developed to automatically execute orders placed on the deSwap Liquidity Network (DLN) across supported blockchains",
"license": "GPL-3.0-only",
"author": "deBridge",
Expand Down
4 changes: 3 additions & 1 deletion src/processors/universal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ class UniversalProcessor extends BaseOrderProcessor {
}

private async evaluateAndFulfill(metadata: CreatedOrderMetadata): Promise<void> {
const timeStart = new Date().getTime();
const { context, orderInfo } = metadata.context;
const { orderId } = orderInfo;
const { logger } = context;
Expand Down Expand Up @@ -903,7 +904,8 @@ class UniversalProcessor extends BaseOrderProcessor {
// order is fulfilled, remove it from queues (the order may have come again thru WS)
this.clearInternalQueues(orderInfo.orderId);
context.giveChain.TVLBudgetController.flushCache();
logger.info(`order fulfilled: ${orderId}`);
const elapsedTime = new Date().getTime() - timeStart;
logger.info(`order ${orderId} probably fulfilled in ${elapsedTime / 1000}s`);

// putting the order to the mempool, in case fulfill_txn gets lost
const fulfillCheckDelay: number =
Expand Down

0 comments on commit 58e1f1c

Please sign in to comment.