agendas: store computed times for partial bookings (#80877) #150
Loading…
Reference in New Issue
No description provided.
Delete Branch "wip/80877-partial-bookings-store-computed-times"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
2270fffe43
to27982491a1
WIP: agendas: store computed times for partial bookings (#80877)to agendas: store computed times for partial bookings (#80877)27982491a1
to1e867bbbcb
3fcfb97645
tode21d898eb
@ -2967,0 +3040,4 @@
old_computed_start_time == self.computed_start_time
and old_computed_end_time == self.computed_end_time
):
return
Une optimisation qui ferait gagner davantage de requêtes que celle-ci ce serait d'appeler Booking.objects.bulk_update dans les méthodes async_, aucune idée du gain réel cependant
j'ai modifié le code pour faire avec bulk_update
@ -1404,6 +1404,7 @@ def test_events_check_status_events(app, user, partial_bookings):
user_check_start_time=datetime.time(7, 55),
user_check_end_time=datetime.time(17, 15),
)
booking1.refresh_computed_times()
Cette ligne est vraiment utile sachant qu'on passe par la méthode get_computed_start_time en dessous ?
j'ai enlevé les appels à get_computed_foo, et plutôt ajouté un test sur les champs computed_foo
de21d898eb
todb1c185b1f
db1c185b1f
to15b2b26c08