memsql/common/sql_step_queue/queue.py
def enqueue(self, data):
        """ Enqueue task with specified data. """
        jsonified_data = json.dumps(data)
        with self._db_conn() as conn:
            return conn.execute(
                'INSERT INTO %s (created, data) VALUES (%%(created)s, %%(data)s)' % self.table_name,
                created=datetime.utcnow(),
                data=jsonified_data
            )
def enqueue(self, data):
        """ Enqueue task with specified data. """
        jsonified_data = json.dumps(data)
        with self._db_conn() as conn:
            return conn.execute(
                'INSERT INTO %s (created, data) VALUES (%%(created)s, %%(data)s)' % self.table_name,
                created=datetime.utcnow(),
                data=jsonified_data
            )
Enqueue task with specified data.