-
Notifications
You must be signed in to change notification settings - Fork 1
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
simplify file upload statuses #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -78,6 +78,30 @@ Dropzone.propTypes = { | |||
id: PropTypes.string.isRequired, | |||
}; | |||
|
|||
export const getStatus = (status) => { | |||
switch (status) { | |||
case 'UPLOADING': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put these statuses in a constant somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was wondering about that. certainly could, I did on the backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with leaving these here if it's the only place they're referenced. This function basically becomes the constant.
@@ -78,6 +78,30 @@ Dropzone.propTypes = { | |||
id: PropTypes.string.isRequired, | |||
}; | |||
|
|||
export const getStatus = (status) => { | |||
switch (status) { | |||
case 'UPLOADING': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with leaving these here if it's the only place they're referenced. This function basically becomes the constant.
commit 68a69d1 Merge: f9408ad 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 11:39:32 2021 -0500 Merge pull request #196 from adhocteam/cm-310-update-file-statuses simplify file upload statuses commit 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:43:33 2021 -0500 fmt commit b7724ce Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:39:19 2021 -0500 add tests for getStatus() commit cc12546 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:04:59 2021 -0500 simplify file upload statuses
commit 68a69d1 Merge: f9408ad 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 11:39:32 2021 -0500 Merge pull request #196 from adhocteam/cm-310-update-file-statuses simplify file upload statuses commit 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:43:33 2021 -0500 fmt commit b7724ce Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:39:19 2021 -0500 add tests for getStatus() commit cc12546 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:04:59 2021 -0500 simplify file upload statuses
commit 68a69d1 Merge: f9408ad 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 11:39:32 2021 -0500 Merge pull request #196 from adhocteam/cm-310-update-file-statuses simplify file upload statuses commit 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:43:33 2021 -0500 fmt commit b7724ce Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:39:19 2021 -0500 add tests for getStatus() commit cc12546 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:04:59 2021 -0500 simplify file upload statuses
commit 68a69d1 Merge: f9408ad 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 11:39:32 2021 -0500 Merge pull request #196 from adhocteam/cm-310-update-file-statuses simplify file upload statuses commit 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:43:33 2021 -0500 fmt commit b7724ce Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:39:19 2021 -0500 add tests for getStatus() commit cc12546 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:04:59 2021 -0500 simplify file upload statuses
commit 68a69d1 Merge: f9408ad 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 11:39:32 2021 -0500 Merge pull request #196 from adhocteam/cm-310-update-file-statuses simplify file upload statuses commit 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:43:33 2021 -0500 fmt commit b7724ce Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:39:19 2021 -0500 add tests for getStatus() commit cc12546 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:04:59 2021 -0500 simplify file upload statuses
commit 68a69d1 Merge: f9408ad 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 11:39:32 2021 -0500 Merge pull request #196 from adhocteam/cm-310-update-file-statuses simplify file upload statuses commit 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:43:33 2021 -0500 fmt commit b7724ce Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:39:19 2021 -0500 add tests for getStatus() commit cc12546 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:04:59 2021 -0500 simplify file upload statuses
commit 68a69d1 Merge: f9408ad 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 11:39:32 2021 -0500 Merge pull request #196 from adhocteam/cm-310-update-file-statuses simplify file upload statuses commit 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:43:33 2021 -0500 fmt commit b7724ce Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:39:19 2021 -0500 add tests for getStatus() commit cc12546 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:04:59 2021 -0500 simplify file upload statuses
commit 68a69d1 Merge: f9408ad 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 11:39:32 2021 -0500 Merge pull request #196 from adhocteam/cm-310-update-file-statuses simplify file upload statuses commit 7f4d157 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:43:33 2021 -0500 fmt commit b7724ce Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:39:19 2021 -0500 add tests for getStatus() commit cc12546 Author: Chuck McAndrew <[email protected]> Date: Thu Feb 25 10:04:59 2021 -0500 simplify file upload statuses
Description of change
Simplified file statuses presented to user. The mapping is now
UPLOADING -> Uploading
UPLOADED -> Uploaded
UPLOAD_FAILED, QUEUING_FAILED -> Upload Failed
SCANNING_QUEUED, SCANNING -> Scanning
APPROVED -> Approved
REJECTED -> Rejected.
Once HHS#317 is complete, then QUEUING_FAILED will be moved to Scanning since it will have retry for failed queuing.
How to test
docker stop head-start-ttadp_redis_1
)Note: if you start redis again within the timeout period then queuing will succeed and the job will get processed, so we currently have some resiliency there for dropouts.
Issue(s)
Checklist