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

Rounding feedback opportunity timestamp #14

Merged
merged 3 commits into from
Apr 15, 2022

Conversation

kapil1garg
Copy link
Contributor

@kapil1garg kapil1garg commented Apr 15, 2022

This PR introduces a bugfix for an issue where, on the server, feedback opportunities would not execute because the timestamp had a small amount of variance in seconds and the engine expected the timestamp to be an exact match (e.g., a script should trigger at studio on 04-08-22 13:00:00 but the timestamp for the script's actionable feedback is 04-08-22 13:00:04, which would not exact match). The current fix involves flooring the feedback opportunity's timestamp to the nearest 5 mins, which works for now but there might be more robust ways to handle this issue (see #13).

This PR also updates the simulation code for testing locally, where now a small amount of jitter to the system clock is added throughout the simulation. This more closely mimics how the code would execute on the server where, due to execution time, some parts of the code would not execute--for example--every 30 mins on the dot.

this currently breaks simulations from running since the rest of the code has not been adapted to handle the noise in the timestamps, but will help in testing the situation where it was breaking on the server
simulation will now work with the jittering the previous commit added
@kapil1garg kapil1garg merged commit b194146 into main Apr 15, 2022
@kapil1garg kapil1garg deleted the bugfix/feedback-opportunity-timestamp branch April 15, 2022 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feedback opportunity's timestamp isn't rounded, which causes issues in feedback delivery
1 participant