Open GoogleCodeExporter opened 9 years ago
Is this still a problem? I think I may have fixed it
Original comment by Jim.mixt...@gmail.com
on 28 Oct 2009 at 2:29
it was still a problem
autodiscover launch cronScheduler.execute()
so you can have in it database access in it before it creation :
so i changed :
status, created = Cron.objects.get_or_create(pk=1)
# This is important for 2 reasons:
# 1. It keeps us for running more than one instance of the
# same job at a time
# 2. It reduces the number of polling threads because they
# get killed off if they happen to check while another
# one is already executing a job (only occurs with
# multi-threaded servers)
if status.executing:
return
to :
try:
status, created = Cron.objects.get_or_create(pk=1)
# This is important for 2 reasons:
# 1. It keeps us for running more than one instance of the
# same job at a time
# 2. It reduces the number of polling threads because they
# get killed off if they happen to check while another
# one is already executing a job (only occurs with
# multi-threaded servers)
if status.executing:
return
except:
# stop processing because we couldn't read the database
return
Original comment by neoke...@gmail.com
on 2 Nov 2011 at 3:02
Original issue reported on code.google.com by
kylemacfarlane@gmail.com
on 17 Jul 2009 at 10:23