xrefcheck/package.yaml
Constantine Ter-Matevosian 032395007b
[#31] Handle the "429 too many requests" errors
Problem: The current version of xrefcheck handles the HTTP responses
with the 429 status code just like every other error, when it is
possible to try and eliminate the occurrences of such errors within the
program itself.

Solution: Each time the result of performing a request on a given link
is a 429 error, retrieve the Retry-After information, describing the
delay (in seconds), from the headers of the HTTP response, or,
alternatively, use a configurable default value if the Retry-After
header is absent, and rerun the request after an amount of time
described by the said value had passed. Only after the number of retries
had reached its limiting value, which, as of right now, is not
configurable and is hardcoded, is when the 429 error is converted into
becoming 'unfixable', and any further attempts to remove the error are
terminated.

Additionally, the progress bar has been upgraded and the following
elements are supplied:
1. an extra color -- Blue -- indicating the errors that might get
   eliminated during the verification;
2. a timer with the number of seconds left to wait for the restart of
   the request; if, during the verification, a new 429 error had emerged
   with the new Retry-After value being greater than or equal to the
   elapsed time, the timer is immediately updated with that value and
   begins ticking down each second from scratch.
2022-07-14 17:25:52 +03:00

168 lines
3.3 KiB
YAML

# SPDX-FileCopyrightText: 2018-2021 Serokell <https://serokell.io>
#
# SPDX-License-Identifier: MPL-2.0
spec-version: 0.31.0
name: xrefcheck
version: 0.2
github: serokell/xrefcheck
license: MPL-2.0
license-file: LICENSE
author: Kostya Ivanov, Serokell
maintainer: Serokell <hi@serokell.io>
copyright: 2018-2019 Serokell <https://serokell.io>
description: Please see the README on GitHub at <https://github.com/serokell/xrefcheck#readme>
extra-source-files:
- README.md
- CHANGES.md
default-extensions:
- AllowAmbiguousTypes
- BangPatterns
- BlockArguments
- ConstraintKinds
- DataKinds
- DefaultSignatures
- DeriveDataTypeable
- DeriveGeneric
- DerivingStrategies
- FlexibleContexts
- FlexibleInstances
- FunctionalDependencies
- GeneralizedNewtypeDeriving
- ImportQualifiedPost
- LambdaCase
- MultiParamTypeClasses
- MultiWayIf
- NamedFieldPuns
- NoImplicitPrelude
- OverloadedStrings
- RankNTypes
- RecordWildCards
- ScopedTypeVariables
- StandaloneDeriving
- TemplateHaskell
- TupleSections
- TypeFamilies
- UndecidableInstances
- ViewPatterns
- TypeApplications
- TypeOperators
ghc-options:
- -Weverything
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wmissing-deriving-strategies
- -Wno-missing-safe-haskell-mode
- -Wno-unsafe
- -Wno-missing-import-lists
- -Wno-missing-local-signatures
- -Wno-missing-export-lists
- -Wno-all-missed-specialisations
- -Wno-prepositive-qualified-module
- -Wno-monomorphism-restriction
dependencies:
- base
library:
source-dirs: src
generated-other-modules:
- Paths_xrefcheck
dependencies:
- aeson
- aeson-casing
- async
- bytestring
- containers
- cmark-gfm
- data-default
- directory-tree
- directory
- dlist
- filepath
- raw-strings-qq
- fmt
- ftp-client
- Glob
- http-client
- http-types
- lens
- pretty-terminal
- modern-uri
- mtl
- o-clock
- optparse-applicative
- regex-tdfa
- req
- roman-numerals
- text
- text-metrics
- th-lift-instances
- time
- universum
- yaml
executables:
xrefcheck:
main: Main.hs
source-dirs: exec
generated-other-modules:
- Paths_xrefcheck
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
dependencies:
- xrefcheck
- bytestring
- universum
- with-utf8
tests:
xrefcheck-tests:
main: Main.hs
source-dirs: tests
generated-other-modules:
- Paths_xrefcheck
dependencies:
- case-insensitive
- containers
- firefly
- hspec
- hspec-expectations
- QuickCheck
- xrefcheck
- bytestring
- directory
- fmt
- http-types
- HUnit
- o-clock
- regex-tdfa
- time
- universum
- yaml
build-tools:
- hspec-discover
links-tests:
main: Main.hs
source-dirs: links-tests
build-tools: tasty-discover:tasty-discover
generated-other-modules:
- Paths_xrefcheck
dependencies:
- optparse-applicative
- tagged
- tasty
- tasty-hunit
- xrefcheck
- universum