[Project A] Devlog #4: Attendance
Before we begin, if you want more context, you can read the previous entry in this series. It is here.
I didn't do much today. A lot of my time was spent working on one feature(which I will talk about in a bit) and meetings to get in sync with other teams that required some data from me in Project D.
That being said, what I did today, will reduce the work I have to do later on, so all in all, this was time well spent.
I generated a new context for the attendance. I then linked it to the profiles because the attendance will be generated based on the profiles. The context generated a lot of the boilerplate I would need for the other operations regarding the attendance, but the main thing that I needed for the attendance, I had to do myself.
I created a method that would generate the attendance entries for the profiles on the day of running the request. The idea is to have a scheduled task that will run periodically and generate attendance for profiles so that the UI will have some data to update.
I then made it so that the attendance can only be generated once for any given day by creating a unique_index on the profile and date. The current implementation works for what I need it to do, but there are a few bugs in the implementation. Eg, I need to handle failures for the bulk insert. But I will do that later on after I have automated the process of generating the attendance.
That's all for now, until next time, I bid you adieu.