def main():
    mitto = Mitto(
        base_url=BASE_URL,
        api_key=API_KEY
    )
    job_schedule = mitto.update_job_schedule(job_id=JOB_ID, job_schedule=SCHEDULE)
    print(job_schedule)
Пример #2
0
def main():
    mitto = Mitto(
        base_url=BASE_URL,
        api_key=API_KEY
    )
    job_webhook = mitto.create_job_webhook(job_id=JOB_ID, job_hook=WEBHOOK)
    print(job_webhook)
Пример #3
0
def main():
    # set up Jinja
    template_env = Environment(loader=FileSystemLoader(INPUT_DIRECTORY))
    template = template_env.get_template(TEMPLATE_FILE)

    # set up Mitto
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)

    # create a Mitto job for each Jinja job template
    for job in MITTO_JOBS:
        jinja_template = template.render(job_name=job["name"],
                                         job_title=job["title"],
                                         sql=job["sql"])
        job_template = json.loads(jinja_template)
        job = mitto.create_job(job=job_template)
        print(job)
Пример #4
0
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)

    job = mitto.create_job(job=JOB)
    print(job)
Пример #5
0
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)
    jobs = mitto.get_jobs()
    for job in jobs:
        print(job["id"], job["name"])
Пример #6
0
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)
    about = mitto.get_about()
    version = about["version"]
    print(version)
Пример #7
0
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)

    updated_job = mitto.update_job_conf(job_id=JOB_ID, job_conf=JOB_CONF)
    print(updated_job)
Пример #8
0
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)
    job_schedule = mitto.get_job_schedule(job_id=JOB_ID)
    print(job_schedule)