X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/522d7fd117285e4e4ce3ea5ec9b5a1722521b681..7b8d8e8f4b57bd51fd6d0f0d926b821f06b0e1f0:/build_run.go diff --git a/build_run.go b/build_run.go index da75679..cc12cf2 100644 --- a/build_run.go +++ b/build_run.go @@ -19,12 +19,12 @@ import ( // buildLineBytes is the most bytes of one line in a build input or usage log. const buildLineBytes = 1 << 20 +// buildWaitTimeout is the longest wait for pending memory builds. +const buildWaitTimeout = time.Second + // buildQuotaLimit is the largest increase in used quota points of a run. const buildQuotaLimit = 15.0 -// buildCallLimit is the most model calls of a run. -const buildCallLimit = 660 - // BuildRun appends messages, builds their tree, and stops the run by the rules // of buildStop. type BuildRun struct { @@ -116,7 +116,7 @@ func (r *BuildRun) check() string { // waitBuilds waits up to one second without leaving a child context open. func (r *BuildRun) waitBuilds(ctx context.Context) error { - ctx, cancel := context.WithTimeout(ctx, time.Second) + ctx, cancel := context.WithTimeout(ctx, buildWaitTimeout) defer cancel() return r.memory.Wait(ctx)