def store_callback(result):
    sql_insert = 'INSERT INTO your_table VALUES(?, ?,)'
curs.execute(sql_insert, result)

def add(num1, num2, user):
    return [num1 + num2, user]
curs.execute('SELECT * FROM your_table WHERE user = ?', [_user])
user_exists = curs.fetchone()
if user_exists:
    add.apply_async((num1, num2, user), link=store_callback.s())
How to enter arguments of celery jobs into database to be queried; using mysql