-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Request: return the booking id when making the booking OR return booking name from description in the booking object.
Why? Reduce load on system from system-wide testing that makes many bookings simultaneously
Priority - low; considered premature optimisation at the present moment but may not be once system-wide testing is running
Background:
We make bookings based on the display name in the description, but the booking receipts do not contain that name. To get the activity for the booking, you have to get activities for all recent bookings. The system-wide testing system will create a lot of bookings at once, so requesting activities for all recent bookings will place additional load on the system with O(N^2) because each extra instance making a simultaneous booking has to download all the other activities its peers made. Currently bookjs gets the activity to obtain the picture and details of the booking to display to the user.
[{'cancelled_at': '0001-01-01T00:00:00.000Z',
'name': '93f2bf14-168a-4b61-9264-408fd3f01cb5',
'policy': 'p-opendays-students',
'slot': 'sl-opendays-students-spin51',
'started_at': '0001-01-01T00:00:00.000Z',
'user': 'cqd7loecfu9c3q2nmot0',
'when': {'end': '2024-07-29T17:14:09.765Z',
'start': '2024-07-29T17:13:39.765Z'}}]
Yet when we request the activity, we get the name in the description:
{'config': 'https://app.practable.io/ed0/static/config/experiments/spinner/spin51-2.0.json',
'description': {'image': 'https://app.practable.io/ed0/static/images/booking/slots/spinner-real-2.0/image.png',
'name': 'Spinner 51 (Open Days)',
'short': 'A PID-controlled brushed motor with 90g disk of size ⌀:65mm t:10mm',
'thumb': 'https://app.practable.io/ed0/static/images/booking/slots/spinner-real-2.0/thumb.png',
'type': 'slot'},
'exp': 1722273249,
'nbf': 1722273219,
'streams': <snip>