chphoom / aroundtheblock

0 stars 1 forks source link

22 scheduler #47

Closed chphoom closed 1 year ago

chphoom commented 1 year ago

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.

chphoom commented 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

chphoom commented 1 year ago

updated according to feedback from diane, we just need to choose/make a better generator for the art styles

elaine331917 commented 1 year ago

when can this be merged?

chphoom commented 1 year ago

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

chphoom commented 1 year ago

ready to merge