Closed chphoom closed 1 year ago
once this has been reviewed you can change the "projects" on the right from "ini progress" to "done" but still don't merge
updated according to feedback from diane, we just need to choose/make a better generator for the art styles
when can this be merged?
when can this be merged?
when we change dec data to not create a current challenge, bc once the scheduler is merged it's just going to keep generating new things every 5 mins
ready to merge
okay so in the scripts folder there is a file called schedule.py
this file defined the task (adding a new wechallenge) which occurs in a set interval
this is determined by the the INTERVAL value which is in seconds**** for debug and demo purposes
the challenge that is created will automatically have start and end dates set accordingly (starting when the object is created and ending in start+INTERVAL time)
THE SCHEDULER LOOP STARTS UPON STARTUP OF THE FASTAPI APP AND STOPS UPON APP SHUTDOWN
I tested the scheduler at 5 sec intervals, which can cause a delay due to the time it takes to actually generate and process items into the database but it still works perfectly fine it just skips some calls. This delay probably doesn't happen in larger intervals and even if it does, thee start and end times are still set accordingly and larger intervals will prevent overlap.
DO NOT MERGE THIS***** please review and test but do not merge to main until we decide what intervals to create the new challenges because may create multiple active/current challenges. We will have to modify the intervals and mock data for demo.