I'm working on a Python script that launches a temporary QCFractal server instance to run some workflows, and I had a couple of questions. This is the current starter code that I was playing around with:
def main():
server = FractalSnowflake()
client = server.client()
My script just hangs (does not exit) after it has initialized the server and the client. Do you know why this is the case? What is the proper way to exit the script?
I've tried inserting a call to server.stop(), but this function call actually blocks and doesn't return.
I think the above behavior has to do with the async IO loop that gets launched, and I saw that I can disable this by passing in start_server=False to the FractalSnowflake constructor. I don't actually know what happens under the hood though -- will passing in this flag affect the downstream workflows?
Describe what you are trying to achieve
I'm working on a Python script that launches a temporary QCFractal server instance to run some workflows, and I had a couple of questions. This is the current starter code that I was playing around with:
server.stop()
, but this function call actually blocks and doesn't return.start_server=False
to theFractalSnowflake
constructor. I don't actually know what happens under the hood though -- will passing in this flag affect the downstream workflows?