<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def schedule_job(self, j):
 """ Add the job given by j to the job queue. Note: Does not actually run the job. """

        job_id = uuid.uuid4().hex
        j.job_id = job_id

        session = self.sessionmaker()
        orm_job = ORMJob(
            id=job_id,
            state=j.state,
            app=self.app,
            namespace=self.namespace,
            obj=j)
        session.add(orm_job)
        try:
            session.commit()
        except Exception as e:
            logging.error(
                "Got an error running session.commit(): {}".format(e))

        return job_id