I run a APScheduler alongside Flask application with mongoDB. The goal is to run a function in 30 minutes interval, so I run the job like this:
scheduler_init.add_job(check_for_expire, 'date', run_date=date_activate_until, args=[event],
misfire_grace_time=900)
where "event" is mongoengine object.
The problem is when it goes to function in specified time, the values of "event" are different than the real ones in database (I used debugger to make sure it is so)
Moreover, if I have two different jobs, the values will be different in both two functions and in database (they can be completely different)