Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ build/ *.egg-info/ pypi/rd-client/rdclient/rd pypi/rd-api/rdapi/rd-api *README.rst api/Main.hs +2 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ import qualified Database.Redis as R import qualified Text.PrettyPrint.ANSI.Leijen as D import Config import CliVersion (cliVersion) import Utils import Opts (argParser) import OptsDoc (rdApiDescription) Loading Loading @@ -69,7 +70,7 @@ main :: IO () main = do rdConfig <- execParser opts if showVersion rdConfig then putStrLn "rd-api 1.0.0.0" putStrLn $ "rd-api " <> cliVersion else do resultMaybe <- runMaybeT $ runApiServer rdConfig when (isNothing resultMaybe) $ Loading client/Main.hs +3 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import Control.Retry (retrying, constantDelay, limitRetries, rsIterNumber) import qualified System.Logger as L import Lib (sha1sumOnBytes, guessFilename) import CliVersion (cliVersion) import Utils import Type import Opts Loading Loading @@ -268,7 +269,7 @@ loopUntilAllBlocksReady rc url rdResp oldReadyBlocks downloadTask = do return rdResp else do when (null newReadyBlocks) $ do infol rc "No new blocks ready on server side, waiting 1s" infol rc "No new block ready on server side, waiting 1s" threadDelay 1000000 newRdResp <- getRDResponse rc url unless (respOk newRdResp) $ Loading Loading @@ -307,7 +308,7 @@ main :: IO () main = do opts <- execParser parserInfo if showVersion opts then putStrLn "rd 1.0.0.0" putStrLn $ "rd " <> cliVersion else if null $ urls opts then do putStrLn "No URLs given, nothing to do. See rd --help" Loading package.yaml +1 −1 Original line number Diff line number Diff line name: reliable-download version: 1.0.0.2 version: 1.0.0.3 synopsis: provide reliable download service via HTTP description: reliable-download web application and cli tool homepage: "https://github.com/sylecn/reliable-download#readme" Loading pypi/rd-api/Makefile +7 −4 Original line number Diff line number Diff line Loading @@ -3,16 +3,19 @@ VERSION := $(shell grep 'version:' ../../package.yaml | cut -d':' -f2 | tr -d ' default: @echo "usage: make [dist|install|upload]" bootstrap: test -f ~/.local/bin/wheel || python3 -m pip install --user wheel test -f ~/.local/bin/twine || python3 -m pip install --user twine dist: bootstrap @if ! python3 -c 'import readme_renderer'; then python3 -m pip install --user readme_renderer ; fi @test -f ~/.local/bin/wheel || python3 -m pip install --user wheel @test -f ~/.local/bin/twine || python3 -m pip install --user twine check: bootstrap python3 setup.py check -r -s dist: check cp -u `stack path --local-install-root`/bin/rd-api rdapi/ rm -rf dist/* python3 setup.py -q bdist_wheel --universal upload: dist ~/.local/bin/twine upload dist/* testupload: dist ~/.local/bin/twine upload --repository-url https://test.pypi.org/legacy/ dist/* env TWINE_PASSWORD=XVgnIVGGFjlMRxDV ~/.local/bin/twine upload --repository-url https://test.pypi.org/legacy/ dist/* install: dist python3 -m pip install --user dist/rd_api-$(VERSION)-py2.py3-none-any.whl .PHONY: default twine dist upload install Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ build/ *.egg-info/ pypi/rd-client/rdclient/rd pypi/rd-api/rdapi/rd-api *README.rst
api/Main.hs +2 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ import qualified Database.Redis as R import qualified Text.PrettyPrint.ANSI.Leijen as D import Config import CliVersion (cliVersion) import Utils import Opts (argParser) import OptsDoc (rdApiDescription) Loading Loading @@ -69,7 +70,7 @@ main :: IO () main = do rdConfig <- execParser opts if showVersion rdConfig then putStrLn "rd-api 1.0.0.0" putStrLn $ "rd-api " <> cliVersion else do resultMaybe <- runMaybeT $ runApiServer rdConfig when (isNothing resultMaybe) $ Loading
client/Main.hs +3 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import Control.Retry (retrying, constantDelay, limitRetries, rsIterNumber) import qualified System.Logger as L import Lib (sha1sumOnBytes, guessFilename) import CliVersion (cliVersion) import Utils import Type import Opts Loading Loading @@ -268,7 +269,7 @@ loopUntilAllBlocksReady rc url rdResp oldReadyBlocks downloadTask = do return rdResp else do when (null newReadyBlocks) $ do infol rc "No new blocks ready on server side, waiting 1s" infol rc "No new block ready on server side, waiting 1s" threadDelay 1000000 newRdResp <- getRDResponse rc url unless (respOk newRdResp) $ Loading Loading @@ -307,7 +308,7 @@ main :: IO () main = do opts <- execParser parserInfo if showVersion opts then putStrLn "rd 1.0.0.0" putStrLn $ "rd " <> cliVersion else if null $ urls opts then do putStrLn "No URLs given, nothing to do. See rd --help" Loading
package.yaml +1 −1 Original line number Diff line number Diff line name: reliable-download version: 1.0.0.2 version: 1.0.0.3 synopsis: provide reliable download service via HTTP description: reliable-download web application and cli tool homepage: "https://github.com/sylecn/reliable-download#readme" Loading
pypi/rd-api/Makefile +7 −4 Original line number Diff line number Diff line Loading @@ -3,16 +3,19 @@ VERSION := $(shell grep 'version:' ../../package.yaml | cut -d':' -f2 | tr -d ' default: @echo "usage: make [dist|install|upload]" bootstrap: test -f ~/.local/bin/wheel || python3 -m pip install --user wheel test -f ~/.local/bin/twine || python3 -m pip install --user twine dist: bootstrap @if ! python3 -c 'import readme_renderer'; then python3 -m pip install --user readme_renderer ; fi @test -f ~/.local/bin/wheel || python3 -m pip install --user wheel @test -f ~/.local/bin/twine || python3 -m pip install --user twine check: bootstrap python3 setup.py check -r -s dist: check cp -u `stack path --local-install-root`/bin/rd-api rdapi/ rm -rf dist/* python3 setup.py -q bdist_wheel --universal upload: dist ~/.local/bin/twine upload dist/* testupload: dist ~/.local/bin/twine upload --repository-url https://test.pypi.org/legacy/ dist/* env TWINE_PASSWORD=XVgnIVGGFjlMRxDV ~/.local/bin/twine upload --repository-url https://test.pypi.org/legacy/ dist/* install: dist python3 -m pip install --user dist/rd_api-$(VERSION)-py2.py3-none-any.whl .PHONY: default twine dist upload install