0
I have a function that returns values to be shown in the view. In tests on localhost works perfectly, the server waits for the return of this function and only then presents the data on the screen.
The problem is that when I deploy to Heroku, the server does not expect this return from the function and shows the empty return. I have tried with several options, threading, Concurrent., all work locally, but do not work when I deploy.
with concurrent.futures.ThreadPoolExecutor() as e:
future = e.submit(get_movie_players, soup)
links_list = future.result()
movie_data.append({'name':movie_name,
'cover': movie_cover[0].replace(');',''),
'thumbnail': movie_thumb,
'sinopsys': sinopys,
'date': movie_date,
'duration': movie_duration,
'links': links_list})
In the example, the variable links_list in localhost has the result of Future, but it’s empty when I deploy.