Example #1
0
def execute(request, container):
    logging.info("Starting cron for " + container.lot.name + "...")
    checkInProgressGames(container)
    clot.createGames(request, container)
    clot.setRanks(container)

    #Update the cache. We may not have changed anything, but we update it all of the time anyway. If we wanted to improve this we could set a dirty flag and check it here.
    container.lot.put()
    container.changed()

    logging.info("Cron done")
Example #2
0
def execute(request, container):
  logging.info("Starting cron for " + container.lot.name + "...")
  checkInProgressGames(container)
  clot.createGames(request, container)
  clot.setRanks(container)

  #Update the cache. We may not have changed anything, but we update it all of the time anyway. If we wanted to improve this we could set a dirty flag and check it here.
  container.lot.put()
  container.changed()

  logging.info("Cron done")
Example #3
0
def cron_one_tourney(tourney_id):
	tourney_id = int(tourney_id)
	logging.info( 'in cron_one_tourney(' +str(tourney_id)+' )' )
	
	checkInProgressGames(tourney_id)
	setResultsOfAllFinishedGames(tourney_id)

	if (not main.isTourneyInPlay(tourney_id)) and main.seeIfTourneyCanStart(tourney_id):
		main.startTourney(tourney_id)
		logging.info('******STARTED TOURNEY ' +str(tourney_id)+ '*****')
		logging.info(main.getTourneyType(tourney_id))
		logging.info('main.isTourneyInPlay() ' +str(main.isTourneyInPlay(tourney_id)))
	if main.isTourneyInPlay(tourney_id):
		main.createGames(tourney_id)

	clot.setRanks(tourney_id)
	logging.info( 'cron_one_tourney(' +str(tourney_id)+' ) done' )