Today, I worked on finalizing and deploying the system described in Days 19 and 20 to the server.
There were two main tasks I had to focus on: - Making all the files run as crontab entries on the server - Clearing certain databases so no data is repeated day to day or week to week When I started thinking about the first objective, I realized that it was futile to have Tasks 1 and 2 as separate files, because Task 2 runs whenever Task 1 does. Therefore, the first change I made was appending all of Task 2 to the bottom of Task 1. Then, I started thinking about the second task before finally deploying. The second task proved more complicated than it seems, as there are many moving parts in the system. I realized that I would never clear the initial database (ProblemAreasDatabase) because that contained all of the raw data, providing flexibility for different use cases and needs as was described in earlier posts. The three intermediate databases each storing a day's worth of data for a specific issue (Cold, Warm, and Carbon), were particularly important to clear daily. Otherwise, I would continue to read in the same data for every day in a week, in addition to new data, each day duplicating every day that came before it. Additionally, the aggregate daily database (containing the week's worth of data) would be cleared once a week, so the next weekly report would not hold data from the previous week. After working out these issues, I created new crontab entries on the server to run task_one_and_two every 15 minutes, task_three every day, and task_four every week. I'm excited that I was able to apply all my new knowledge to get such a complex system running! |
AuthorI'm a high school senior and programming enthusiast. Archives
March 2022
Categories |