class_docstr: Interface around the redis for putting tasks to the queue
  
  Attributes:
      db (Redis): database object
      stream
      cache
      pubsub
class_docstr_tok: ["Interface","around","the","redis","for","putting","tasks","to","the","queue","Attributes",":","db","(","Redis",")",":","database","object","stream","cache","pubsub"]
code: def __init__(self) -> None:
      config = Config().get("ml_task_queue", {})
  
      self.db = Database(
          host=config.get("host", "localhost"),
          port=config.get("port", 6379),
          db=config.get("db", 0),
          username=config.get("username"),
          password=config.get("password"),
          protocol=3,
      )
      self.wait_redis_ping(60)
  
      self.stream = self.db.Stream(TASKS_STREAM_NAME)
      self.cache = self.db.cache()
      self.pubsub = self.db.pubsub()
  
file_path: mindsdb/mindsdb/utilities/ml_task_queue/producer.py
imports: import pickle
  from walrus import Database
  from pandas import DataFrame
  from mindsdb.utilities.context import context
  from mindsdb.utilities.config import Config
  from mindsdb.utilities.ml_task_queue.utils import RedisKey, to_bytes
  from mindsdb.utilities.ml_task_queue.task import Task
  from mindsdb.utilities.ml_task_queue.base import BaseRedisQueue
  from mindsdb.utilities.ml_task_queue.const import TASKS_STREAM_NAME, ML_TASK_TYPE, ML_TASK_STATUS
  from mindsdb.utilities import log
label_desc: Use image node_id 1 to create a new MLTaskProducer object from inherited base classes: BaseRedisQueue with example: obj = MLTaskProducer()