I am writing a flask app that asks user to upload excel spreadsheet and then calculate and populate the database.I am trying to do the processing part in the background via Redis RQ but I keep getting TypeError: cannot serialize '_io.TextIOWrapper' object my code looks like this:
from redis import Redis
from rq import Queue
from rq.job import Job
import xlrd as x
workbook = x.open_workbook('data.xls')
sheet = workbook.sheet_by_index(0)
q = Queue(connection = Redis())
def populate(sheet,row,column):
#extract data and save into database
job = enqueue_call(func=populate, args=(sheet,7,5), result_ttl = 5000)
print(job.get_id())