def METHOD_NAME(sender, instance, created, raw, update_fields, **kwargs):
    # Update the project count.
    instance.project.set_counts()
    if created:
        # Generate friendly uid
        uid = auth.new_uid(obj=instance, objtype=Job, prefix="job")
        instance.uid = uid
        # Generate the path based on the uid.
        instance.path = join(settings.MEDIA_ROOT, "jobs", f"{instance.uid}")
        # Create the job directory if it does not exist.
        os.makedirs(instance.path, exist_ok=True)
        # Update the information in db.
        Job.objects.filter(id=instance.id).update(uid=instance.uid, path=instance.path,
                                                  text=instance.text, html=instance.html)