hi,
I am trying to create a site where jobs get posted. Suppose a job post is like starting in Feb 5, 9am. When a user views the page /all_jobs which displays all jobs list, how do I not show the jobs which are past that time?
- Is it better to check the time when user visits
mysite.com/all_jobs
when viewing and then compare that with the posted time and not show it ? - Is it better to run a background job to frequently check database and check the time and update the status of the job?
- Is it better to add some callback function like below? Can this be done in Flask?
@app.route('/all_jobs') @run_my_fun @login_required def all_jobs(): return #query db and show jobs