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

Psp 9893 mayan document queue corrections. #4611

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

devinleighsmith
Copy link
Collaborator

No description provided.

@devinleighsmith devinleighsmith added the bug Something isn't working label Jan 23, 2025
@devinleighsmith devinleighsmith self-assigned this Jan 23, 2025
databaseDocumentQueue.DocProcessRetries += 1;
databaseDocumentQueue.DocProcessEndDt = null;
}

bool isValid = ValidateQueuedDocument(databaseDocumentQueue, documentQueue);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the above logic needs to run after this check - to avoid the processDocRetries from being changed.

if (databaseDocumentQueue.DocumentQueueStatusTypeCode == DocumentQueueStatusTypes.PIMS_ERROR.ToString() || databaseDocumentQueue.DocumentQueueStatusTypeCode == DocumentQueueStatusTypes.MAYAN_ERROR.ToString())
{
this.Logger.LogDebug("Document Queue {documentQueueId}, previously errored, retrying", documentQueue.DocumentQueueId);
databaseDocumentQueue.DocProcessRetries = ++databaseDocumentQueue.DocProcessRetries ?? 1;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using += does not work on a null value.

@@ -243,12 +243,6 @@ public async Task<PimsDocumentQueue> Upload(PimsDocumentQueue documentQueue)
UpdateDocumentQueueStatus(databaseDocumentQueue, DocumentQueueStatusTypes.PIMS_ERROR);
return databaseDocumentQueue;
}
else if (relatedDocument?.MayanId != null && relatedDocument?.MayanId > 0)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect, in addition to having a mayanId, we need to wait for the filedetail to be available.

Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4611

2 similar comments
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4611

Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4611

@asanchezr
Copy link
Collaborator

@devinleighsmith - this doesn't look right...
image

Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4611

@asanchezr asanchezr merged commit a10c014 into bcgov:dev Jan 24, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants