Hi!
I have a question about schedules.. I'm a bit confused there.
I have 4 customers. I want to add a schedule to customer= 'Customer'. I'm adding it, and as expected, this schedule is only available for this particular customer. I'm switching across other customers and their schedules list is empty. Ok.
BUT..
After server restart
$ sudo /opt/TopPatch/tp/src/daemon/vFensed restart
Schedules I've created for just one customer= 'Customer' spread all over all others customers... That's confusing. It shouldn't be this way I guess.
What could be reason of such behavior?
After server restart
Jobstore default:
New (trigger: cron[day_of_week='4', hour='16', minute='22'], next run at: 2014-08-15 16:22:00)
wee (trigger: cron[day_of_week='4', hour='16', minute='23'], next run at: 2014-08-15 16:23:00)
2nd (trigger: cron[day='8', hour='16', minute='23'], next run at: 2014-09-08 16:23:00)
sad (trigger: cron[day_of_week='4', hour='16', minute='24'], next run at: 2014-08-15 16:24:00)
Jobstore Customer:
New (trigger: cron[day_of_week='4', hour='16', minute='22'], next run at: 2014-08-15 16:22:00)
wee (trigger: cron[day_of_week='4', hour='16', minute='23'], next run at: 2014-08-15 16:23:00)
2nd (trigger: cron[day='8', hour='16', minute='23'], next run at: 2014-09-08 16:23:00)
sad (trigger: cron[day_of_week='4', hour='16', minute='24'], next run at: 2014-08-15 16:24:00)
Jobstore SomeNewClient:
New (trigger: cron[day_of_week='4', hour='16', minute='22'], next run at: 2014-08-15 16:22:00)
wee (trigger: cron[day_of_week='4', hour='16', minute='23'], next run at: 2014-08-15 16:23:00)
2nd (trigger: cron[day='8', hour='16', minute='23'], next run at: 2014-09-08 16:23:00)
sad (trigger: cron[day_of_week='4', hour='16', minute='24'], next run at: 2014-08-15 16:24:00)
Jobstore SUPER:
New (trigger: cron[day_of_week='4', hour='16', minute='22'], next run at: 2014-08-15 16:22:00)
wee (trigger: cron[day_of_week='4', hour='16', minute='23'], next run at: 2014-08-15 16:23:00)
2nd (trigger: cron[day='8', hour='16', minute='23'], next run at: 2014-09-08 16:23:00)
sad (trigger: cron[day_of_week='4', hour='16', minute='24'], next run at: 2014-08-15 16:24:00)
This script always shows jobs spread across all customers.
###
from apscheduler.scheduler import Scheduler
from apscheduler.jobstores.redis_store import RedisJobStore
import logging
logging.basicConfig()
def main():
sched = Scheduler(daemonic=False)
sched.add_jobstore(RedisJobStore(db=10), 'default')
sched.add_jobstore(RedisJobStore(db=10), 'SUPER')
sched.add_jobstore(RedisJobStore(db=10), 'Customer')
sched.add_jobstore(RedisJobStore(db=10), 'SomeNewClient')
sched.start()
print sched.print_jobs()
sched.shutdown()
if __name__ == "__main__":
main()
###