Exemplo n.º 1
0
def lose_master():
    job = ServerJob.get_random_server_job()
    t = random.randint(0, 60)
    logger.info('Random mishap: Losing master job %s for %d seconds' %
                (job.get_job_name(), t))
    job.lose_master()
    scheduler.add_relative(t, lambda: job.trigger_master_election())
Exemplo n.º 2
0
def lose_master():
  job = ServerJob.get_random_server_job()
  t = random.randint(0, 60)
  logger.info(
      'Random mishap: Losing master job %s for %d seconds' %
      (job.get_job_name(), t))
  job.lose_master()
  scheduler.add_relative(t, lambda: job.trigger_master_election())
Exemplo n.º 3
0
def trigger_master_election():
    job = ServerJob.get_random_server_job()
    logger.info('Random mishap: Triggering master election in job %s' %
                job.get_job_name())
    job.trigger_master_election()
Exemplo n.º 4
0
def trigger_master_election():
  job = ServerJob.get_random_server_job()
  logger.info(
      'Random mishap: Triggering master election in job %s' %
      job.get_job_name())
  job.trigger_master_election()