Skip to content

Commit

Permalink
feat: Reduce compute time limit for rules functions to 40ms to align …
Browse files Browse the repository at this point in the history
…with Deno Deploy

Signed-off-by: Yoriyasu Yano <[email protected]>
  • Loading branch information
yorinasub17 committed Oct 18, 2023
1 parent 9bf6c67 commit 2d13f5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/engine/interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import { Octokit } from "@octokit/rest";
import { IChangeSetMetadata, IPatch } from "./patch_types.ts";

// Max time in milliseconds for the user defined rule to run. Any UDR functions that take longer than this will throw an error.
const maxUDRRuntime = 5000;
//
// NOTE
// We have a 40 ms limit because our deployment platform (Deno Deploy) only allows 50ms of compute.
const maxUDRRuntime = 40;
// Sleep every 100 steps to yield to other tasks.
const maxStepIterationsBeforeSleep = 100;
const sleepBetweenStepIterations = 100;
Expand Down

0 comments on commit 2d13f5b

Please sign in to comment.