Merge pull request #5013 from urbit/lf/failed-glob

ted/glob: add exponential retry
This commit is contained in:
L 2021-06-15 13:08:32 -05:00 committed by GitHub
commit 617b97b450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,12 @@
^- form:m
=+ !<([~ hash=@uv] arg)
=/ url "https://bootstrap.urbit.org/glob-{(scow %uv hash)}.glob"
;< =cord bind:m (fetch-cord:strandio url)
~| failed-glob+hash
=+ ;;(=glob:glob (cue cord))
;< =glob:glob bind:m
%+ (retry:strandio ,glob:glob) `5
=/ n (strand ,(unit glob:glob))
;< =cord bind:n (fetch-cord:strandio url)
%- pure:n
%- mole
|.
;;(=glob:glob (cue cord))
(pure:m !>(glob))