You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the triggering and expiry timestamps are both rounded down to the nearest 5 minutes (as is the timestamp used to check when scripts are triggered or expired), the timestamp for feedback opportunity is not (see here). Below is an example of what the computed timestamps look like on the database:
With how the execution code is currently written, this causes scripts to not deliver feedback when they are suppose to (culprit here).
Some ways to fix it:
Make sure timestamp for feedback opportunity is rounded
Use >= instead of == for comparison (but maybe do check that the days are correct)
For testing, also good to add some jitter to the simulation timestamps (see here). The reason my tests didn't catch this before is because the simulation would always cause the timestamp to be rounded to the nearest 5 minutes since the system clock gets locked at that time during the simulation, whereas it takes time on the server and thus is no longer locked. Adding jitter to the timestamp allows us to simulate this happening so that the code tests can be more robust.
The text was updated successfully, but these errors were encountered:
While the triggering and expiry timestamps are both rounded down to the nearest 5 minutes (as is the timestamp used to check when scripts are triggered or expired), the timestamp for feedback opportunity is not (see here). Below is an example of what the computed timestamps look like on the database:
With how the execution code is currently written, this causes scripts to not deliver feedback when they are suppose to (culprit here).
Some ways to fix it:
For testing, also good to add some jitter to the simulation timestamps (see here). The reason my tests didn't catch this before is because the simulation would always cause the timestamp to be rounded to the nearest 5 minutes since the system clock gets locked at that time during the simulation, whereas it takes time on the server and thus is no longer locked. Adding jitter to the timestamp allows us to simulate this happening so that the code tests can be more robust.
The text was updated successfully, but these errors were encountered: