834e36cf6f49b73c0c9ee66ee274977ef3a324a1,polyaxon/signals/deletion.py,,job_pre_delete,#Any#,159

Before Change


    if not job.is_running:
        return

    celery_app.send_task(
        SchedulerCeleryTasks.JOBS_STOP,
        kwargs={
            "project_name": job.project.unique_name,
            "project_uuid": job.project.uuid.hex,
            "job_name": job.unique_name,
            "job_uuid": job.uuid.hex,
            "update_status": False,
            "collect_logs": False,
        })


@receiver(post_delete, sender=Job, dispatch_uid="job_post_delete")
@ignore_raw

After Change


@receiver(pre_delete, sender=Job, dispatch_uid="job_pre_delete")
@ignore_raw
def job_pre_delete(sender, **kwargs):
    job = kwargs["instance"]

    // Delete outputs and logs
    celery_app.send_task(
        SchedulerCeleryTasks.STORES_SCHEDULE_OUTPUTS_DELETION,
        kwargs={
            "persistence": job.persistence_outputs,
            "subpath": job.subpath,
        })
    celery_app.send_task(
        SchedulerCeleryTasks.STORES_SCHEDULE_LOGS_DELETION,
        kwargs={
            "persistence": job.persistence_logs,
            "subpath": job.subpath,
        })

    auditor.record(event_type=JOB_CLEANED_TRIGGERED, instance=job)


@receiver(post_delete, sender=Job, dispatch_uid="job_post_delete")
@ignore_raw
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 12

Instances


Project Name: polyaxon/polyaxon
Commit Name: 834e36cf6f49b73c0c9ee66ee274977ef3a324a1
Time: 2019-01-23
Author: mouradmourafiq@gmail.com
File Name: polyaxon/signals/deletion.py
Class Name:
Method Name: job_pre_delete


Project Name: polyaxon/polyaxon
Commit Name: 834e36cf6f49b73c0c9ee66ee274977ef3a324a1
Time: 2019-01-23
Author: mouradmourafiq@gmail.com
File Name: polyaxon/signals/deletion.py
Class Name:
Method Name: job_pre_delete


Project Name: polyaxon/polyaxon
Commit Name: 834e36cf6f49b73c0c9ee66ee274977ef3a324a1
Time: 2019-01-23
Author: mouradmourafiq@gmail.com
File Name: polyaxon/signals/deletion.py
Class Name:
Method Name: tensorboard_job_pre_delete


Project Name: polyaxon/polyaxon
Commit Name: 834e36cf6f49b73c0c9ee66ee274977ef3a324a1
Time: 2019-01-23
Author: mouradmourafiq@gmail.com
File Name: polyaxon/signals/deletion.py
Class Name:
Method Name: build_job_pre_delete


Project Name: polyaxon/polyaxon
Commit Name: 834e36cf6f49b73c0c9ee66ee274977ef3a324a1
Time: 2019-01-23
Author: mouradmourafiq@gmail.com
File Name: polyaxon/signals/deletion.py
Class Name:
Method Name: notebook_job_pre_delete