File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ open Markdig.Syntax
1111open Markdig.Syntax .Inlines
1212open Polly
1313open Polly.Retry
14- open Polly.Timeout
1514
1615let rec visitRecursively ( action : MarkdownObject -> unit ) ( node : MarkdownObject ) =
1716 match node with
@@ -37,6 +36,10 @@ let collectLinks node =
3736 node
3837 urls
3938
39+ let exclusionCodes = Map.ofArray [|
40+ " https://www.lkokemohr.de/fsharp_godot.html" , HttpStatusCode.TooManyRequests // GitHub runner receives this often
41+ |]
42+
4043let printLock = Object()
4144let retryPipeline =
4245 ResiliencePipelineBuilder()
@@ -49,7 +52,10 @@ let checkLinkStatus (client: HttpClient) (url: string) = task {
4952 fun _ -> ValueTask< HttpResponseMessage>( client.GetAsync url)
5053 )
5154 if response.StatusCode <> HttpStatusCode.OK then
52- return Result.Error $" Status code {int response.StatusCode}."
55+ return
56+ match Map.tryFind url exclusionCodes with
57+ | Some code when code = response.StatusCode -> Result.Ok()
58+ | _ -> Result.Error $" Status code {int response.StatusCode}."
5359 else
5460 return Result.Ok()
5561 with
You can’t perform that action at this time.
0 commit comments