Skip to content

Commit

Permalink
fix: remove gimmick progress bar, expand Dates compat version.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghyatzo committed Jan 20, 2025
1 parent c2e2a85 commit 8f1df94
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"

[compat]
Dates = "1.11.0"
Dates = "1.11"
HTTP = "1"
JSON = "0.21"
julia = "1"
Expand Down
4 changes: 0 additions & 4 deletions src/CDSAPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,8 @@ function retrieve(name, params::AbstractDict, filename; wait=1.0)
data = JSON.parse(String(data.body))

if data["status"] != laststatus
print("\e[1K\e[0E") # erase terminal line and reset cursor
@info "$(Dates.format(now(), dateformat"HH:MM:SS")) - CDS request" dataset=name status=data["status"]
laststatus = data["status"]
else
print('.')
end


Expand All @@ -90,7 +87,6 @@ function retrieve(name, params::AbstractDict, filename; wait=1.0)
)
body = JSON.parse(String(response.body))

print("\e[1K\e[0E")
HTTP.download(body["asset"]["value"]["href"], filename)

return data
Expand Down

0 comments on commit 8f1df94

Please sign in to comment.