-
Notifications
You must be signed in to change notification settings - Fork 0
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
[DPR2-1742] add status check #36
Conversation
} | ||
} | ||
else -> { | ||
Thread.sleep(WAIT_TIME) |
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.
Do we really want to be waiting for the query to finish? Each report could take up to 15 minutes, and a single lambda run is limited to 15 minutes. Even running these in parallel would be a bit dicey.
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 its only going to run as long as the time out above, which is currently set to max 120 secs but should probably be a lot less, this was really about capturing failures, which should hopefully happen quite quickly
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 mean in QUERY_STARTED ->, so its waiting for it to start but not necessarily to finish
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've updated the timeout so it will finish 5 secs after the query has started. this will hopefully catch most of the initial errors
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.
Could we look at waiting for the query to be STARTED ?
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.
yes that what the logic does, but it waits based on the configurable timeout. Its currently 5 secs after the query has started, but you think remove the timeout all together or reduce it down further
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.
Ideally as the long term solution as discussed in our call we would want to have this lambda just executing the queries and storing the execution ID without waiting.
Then another lambda can pick up these stored execution ids and check the status periodically.
This is currently implementing all the logic in one lambda but as discussed previously the future state would be to split the lambdas up, so one does the searching / scheduling, then sends events to another lambda which can do the actually work of generating the dataset and checking the status, so there would be 1 lambda execution per dataset generation. Currently this lambda will timeout 5 secs after the query has started.