-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP: Fix kassenbuch get_buchungen for microseconds #143
base: development
Are you sure you want to change the base?
Conversation
This commit just exposes the error and clarifies the type usage travis will fail, so skip CI: [CI skip]
From now on, kassenbuch discards all microseconds when filtering for a specific time range. This may create a race-condition if a booking is made at xxx.100 seconds and then `kassenbuch show` is called at xxx.200 sec, because the booking was made after xxx.000 sec and the `snapshot_time` mechanism filters out the booking from the "future".
Current coverage is 28.33% (diff: 95.83%)
@@ development #143 diff @@
=============================================
Files 54 54
Lines 6774 6789 +15
Methods 0 0
Messages 0 0
Branches 0 0
=============================================
+ Hits 1910 1924 +14
- Misses 4864 4865 +1
Partials 0 0
|
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.
Schaut gut aus, hab keine Probleme gefunden.
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.
schaut gut aus
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.
test
Using
Datetime()
in the SQLite query strips away the microseconds. SQLites cannot do datetime formatting for microseconds, even withstrftime()
.First workaround:
Discards all microseconds when filtering for a specific time range.
Problem:
This may create a race-condition if a booking is made at xxx.100 seconds and then
kassenbuch show
is called at xxx.200 sec, because the booking was made after xxx.000 secand the
snapshot_time
mechanism filters out the booking from the "future".