def main()

in python-batch/gke_batch/batch.py [0:0]


def main(argv):
  """
  """
  jobs = None

  if get_setting("platform", settings) == "gke-autopilot":
    jobs = KubernetesBatchJobs()
  else:
  # Create Cloud Batch jobs object
    print("platform must be set in the settings file. Exiting.")

  # Delete job. JobID must be passed.
  if(FLAGS.delete_job):
    print("Deleting job", file=sys.stderr)
    jobs.delete_job(FLAGS.delete_job)
    exit()

  # Prints list of jobs, in queue, running or complteted.
  if(FLAGS.list_jobs):
    print("Listing jobs", file=sys.stderr)
    jobs.list_jobs()
    exit()

  # Prints config file info
  if FLAGS.debug:
    pass

  if FLAGS.args_file:
    settings.load_file(path=FLAGS.args_file)  # list or `;/,` separated allowed
    for arg in settings.ARGS: 
      print(f"This is the arg: {arg}")
      settings.command = arg
      jobs = KubernetesBatchJobs()
      print(jobs.create_job(jobs.create_job_request()), file=sys.stderr)
    exit()

    
  if FLAGS.create_job:
    # Create the job
    print(jobs.create_job(jobs.create_job_request()), file=sys.stderr)
  else:
    print(jobs.create_job_request(), file=sys.stderr)