Skip to content

Commit

Permalink
Be nice to the package server
Browse files Browse the repository at this point in the history
  • Loading branch information
klaftertief committed Nov 27, 2023
1 parent 1df87ba commit ec7ff03
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/scripts/Setup.elm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Docs.Package.Cache as Cache
import Generate
import Http
import Json.Decode as Decode
import Process
import Set
import Task

Expand Down Expand Up @@ -92,8 +93,17 @@ fetchDocs elmVersion metadata =
decoder =
Package.decode elmVersion metadata
in
Http.get url decoder
|> Http.send (ensureOk Response)
Process.sleep 100
|> Task.andThen
(\_ ->
Http.get url decoder
|> Http.toTask
)
|> Task.attempt (ensureOk Response)



--|> Http.send (ensureOk Response)


cacheModule : Package.Package -> Cmd msg
Expand Down

0 comments on commit ec7ff03

Please sign in to comment.