Anvil.server.context.client.type

Through a series of mixed imports, I have a Global import that attempts to login when generating the PDF. This hangs up the process and causes a failure. I am trying to avoid that logic by checking if it is in a background task.

I could trace exactly where it is getting imported and restructure a bit, but I thought using the context would suffice.