Skip to content

Commit

Permalink
handle offchain resolver's max execution time (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
defi-dev authored Jul 2, 2024
1 parent bb01dd5 commit 6e03922
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,10 @@ export class Network {
jobsToExecute += 1;
} catch (e) {
this.clog('error', `method: getOffchainResolveCalldata, jobKey: ${jobKey}, error message: ${e.message}`);
if (e.message.includes('Max execution time')) {
agent.addJobToBlacklist(jobKey, e.message);
this.unregisterResolver(jobKey);
}
}
delete this.offchainResolverPending[jobKey];
} else {
Expand Down

0 comments on commit 6e03922

Please sign in to comment.