code: def execute_task(self, record_id, exec_method):
      executor = JobsExecutor()
      if exec_method == "local":
          history_id = executor.lock_record(record_id)
          if history_id is None:
              # db.session.remove()
              logger.info(
                  f"Unable create history record for {record_id}, is locked?"
              )
              return
  
          # run in thread
  
          self.q_in.put(
              {
                  "type": "task",
                  "record_id": record_id,
                  "history_id": history_id,
              }
          )
  
          while True:
              try:
                  self.q_out.get(timeout=3)
                  break
              except queue.Empty:
                  # update last date:
                  history_record = db.JobsHistory.query.get(history_id)
                  history_record.updated_at = dt.datetime.now()
                  db.session.commit()
  
      else:
          # TODO add microservice mode
          raise NotImplementedError()
  
file_path: mindsdb/mindsdb/interfaces/jobs/scheduler.py
imports: import datetime
  import queue
  import random
  import threading
  import time
  from mindsdb.interfaces.jobs.jobs_controller import JobsExecutor
  from mindsdb.interfaces.storage import db
  from mindsdb.utilities import log
  from mindsdb.utilities.config import Config
label_desc: Use image node_id 6 for calling the Scheduler obj's underlying member method code with example usage: obj.execute_task(record_id, exec_method) without return types