What I’m trying to do:
Trying to write a module that accepts two dictionaries of data and returns a dictionary of results so that I can call import this common code in two places: an excel creation routine, and a .pdf report generator.
What I’ve tried and what’s not working:
My excel and .pdf generators are background tasks because they take so long. I’ve written the ‘module’ as a server.callable… so when I import this in my .pdf generator background task… the module times out because it’s taking longer than 30 seconds. I can’t make this module a background task because my .pdf generator has to get the results…
How do create or include a module (I really want this to be code I can re-use) so that it does not time out? Perhaps my understanding of background tasks is flawed - I don’t think I can ‘call’ a background task and expect the calling code to simply ‘wait’ for the return value