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

Add undeliveredUploads feature to UploadStats. #197

Merged
merged 12 commits into from
Oct 1, 2024

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package gov.cdc.ocio.processingstatusapi.models.query

import com.expediagroup.graphql.generator.annotations.GraphQLDescription

@GraphQLDescription("Collection of undelivered uploads found")
data class PendingUploadCounts(

@GraphQLDescription("Total number of undelivered uploads.")
var totalCount: Long = 0,

@GraphQLDescription("Provides a list of all the uploads that have not been delivered. This means, the upload started, but according to the upload status reports we did not receive 100% of the expected chunks.")
var pendingUploads: List<UnDeliveredUpload> = listOf()
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package gov.cdc.ocio.processingstatusapi.models.query

import com.expediagroup.graphql.generator.annotations.GraphQLDescription

@GraphQLDescription("Collection of undelivered found")
data class UnDeliveredUpload(

@GraphQLDescription("UploadId of the file that is not delivered.")
var uploadId: String? = null,

@GraphQLDescription("Filename of the file that is not delivered.")
var filename: String? = null
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package gov.cdc.ocio.processingstatusapi.models.query

import com.expediagroup.graphql.generator.annotations.GraphQLDescription

@GraphQLDescription("Collection of undelivered uploads found")
data class UnDeliveredUploadCounts(

@GraphQLDescription("Total number of undelivered uploads.")
var totalCount: Long = 0,

@GraphQLDescription("Provides a list of all the uploads that have not been delivered. This means, the upload started, but according to the upload status reports we did not receive 100% of the expected chunks.")
var unDeliveredUploads: List<UnDeliveredUpload> = listOf()
)
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ data class UploadStats(
var completedUploadsCount: Long = 0,

@GraphQLDescription("Provides a list of all the duplicate filenames that were uploaded and how many.")
var duplicateFilenames: List<DuplicateFilenameCounts> = listOf()
var duplicateFilenames: List<DuplicateFilenameCounts> = listOf(),

@GraphQLDescription("Provides a list of all the uploads that have not been delivered. This means, the upload started, but according to the upload status reports we did not receive 100% of the expected chunks.")
var unDeliveredUploads: UnDeliveredUploadCounts = UnDeliveredUploadCounts(),

@GraphQLDescription("Provides a list of all the uploads that are pending. This means, the upload started, but according to the upload status reports we did not receive 100% of the expected chunks.")
var pendingUploads: PendingUploadCounts = PendingUploadCounts()
)
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fun Application.graphQLModule() {
NotificationsMutationService(),
DataStreamTopErrorsNotificationSubscriptionMutationService(),
DeadlineCheckSubscriptionMutationService(),
UploadErrorsNotificationSubscriptionMutationService()
UploadErrorsNotificationSubscriptionMutationService(),
ReportMutation()

)
Expand Down
2 changes: 1 addition & 1 deletion pstatus-graphql-ktor/src/main/resources/application.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ktor {
deployment {
port = 8082
port = 8080
host = 0.0.0.0
}

Expand Down
Loading