Skip to content

Commit

Permalink
http: Set job cpu time (#1636)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-FEXrt authored Aug 22, 2024
1 parent 20dd7c3 commit e238ef1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions share/wake/lib/system/http.wake
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ export def makeRequest (request: HttpRequest): Result HttpResponse Error =
# Web is unreliable and should never be reused
| setPlanPersistence ReRun
| setPlanFnOutputs (\_ Nil)
# Curl jobs don't use many resources, most time is spent waiting for a response
| setPlanUsage (Usage 0 0.0 0.1 0 0 0)
| runJobWith localRunner
| setJobTag "http.method" "{method | methodToString}"
| setJobTag "http.url" url
Expand Down Expand Up @@ -320,6 +322,8 @@ export def makeBinaryRequest (request: HttpRequest): Result Path Error =
# Match persistence of curl job below
| setPlanPersistence Once
| setPlanFnOutputs (\_ Nil)
# Cleanup doesn't use many resources but isn't reused so wake never learns that
| setPlanUsage (Usage 0 0.0 0.002 0 0 0)
| runJobWith localRunner
| setJobTag "http.cleanup" destination
| setJobInspectVisibilityHidden
Expand All @@ -338,6 +342,8 @@ export def makeBinaryRequest (request: HttpRequest): Result Path Error =
# the same request is made twice in the same invocation
| setPlanPersistence Once
| setPlanFnOutputs (\_ destination, Nil)
# Curl jobs don't use many resources, most time is spent waiting for a response
| setPlanUsage (Usage 0 0.0 0.1 0 0 0)
| runJobWith localRunner
| setJobTag "http.method" methodStr
| setJobTag "http.url" url
Expand Down

0 comments on commit e238ef1

Please sign in to comment.