Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PSL-1216] optimize multi-volume registration #903

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed hermes/hermes
Binary file not shown.
2 changes: 1 addition & 1 deletion hermes/service/hermes/logsrotator/log_rotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

const (
runTaskInterval = 30 * time.Minute
maxLogSize = 10 * 1024 * 1024 // 10 MB
maxLogSize = 200 * 1024 * 1024 // 200 MB
destDir = "/tmp"
)

Expand Down
2 changes: 1 addition & 1 deletion walletnode/api/design/cascade.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ var _ = Service("cascade", func() {
Payload(func() {
Extend(DownloadTaskStatePayload)
})
Result(ArrayOf(TaskHistory))
Result(DownloadTaskStatus)

HTTP(func() {
GET("/downloads/{file_id}/status")
Expand Down
60 changes: 58 additions & 2 deletions walletnode/api/design/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ var RegisterTaskPayload = Type("RegisterTaskPayload", func() {
var DownloadTaskStatePayload = Type("DownloadTaskStatePayload", func() {
Attribute("file_id", String, "File ID returned by Download V2 API", func() {
TypeName("file_id")
MinLength(8)
MaxLength(8)
MinLength(6)
MaxLength(6)
Example("n6Qn6TFM")
})
Required("file_id")
Expand Down Expand Up @@ -128,6 +128,62 @@ var TaskHistory = Type("TaskHistory", func() {
Required("status")
})

// DownloadTaskStatus is status of the download task
var DownloadTaskStatus = Type("DownloadTaskStatus", func() {
Attribute("total_volumes", Int, func() {
Description("Total Volumes")
Example(1)
})

Attribute("downloaded_volumes", Int, func() {
Description("Number of volumes successfully downloaded")
Example(1)
})

Attribute("volumes_download_in_progress", Int, func() {
Description("Number of volumes currently being downloaded")
Example(1)
})

Attribute("volumes_pending_download", Int, func() {
Description("Number of volumes awaiting schedule")
Example(1)
})

Attribute("volumes_download_failed", Int, func() {
Description("Number of volumes failed to download")
Example(1)
})

Attribute("task_status", String, func() {
Description("Status of the operation")
Example("In Progress")
Enum("Completed", "Failed", "In Progress")
})

Attribute("size_of_the_file_megabytes", Int, func() {
Description("size of the file in megabytes")
Example(1)
})

Attribute("data_downloaded_megabytes", Int, func() {
Description("data downloaded in megabytes so far")
Example(1)
})

Attribute("message", String, func() {
Description("message string (if any)")
Example("Balance less than maximum fee provied in the request, could not gather enough confirmations...")
})

Attribute("details", Details, func() {
Description("details of the status")
})

Required("total_volumes", "downloaded_volumes", "volumes_download_in_progress", "volumes_download_failed", "task_status", "details",
"volumes_pending_download", "size_of_the_file_megabytes", "data_downloaded_megabytes")
})

// ActionDetailsResult - result of posting action details
var ActionDetailsResult = ResultType("application/sense.start-action", func() {
TypeName("actionDetailResult")
Expand Down
4 changes: 2 additions & 2 deletions walletnode/api/gen/cascade/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 26 additions & 1 deletion walletnode/api/gen/cascade/service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions walletnode/api/gen/http/cascade/client/cli.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions walletnode/api/gen/http/cascade/client/encode_decode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading