-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
60 sofast curl interface #75
Conversation
opencsp/app/sofast/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To add:
- SpatialOrientation
- DisplayShape
- DotLocations
- FacetDefinition (EnsembleDefinition if we want to support facet ensembles now)
- Surface 2D definition
…ethods to MirrorPoint, add load_from_hdf_guess_type to Surface2DAbstract, improved hdf5 comments
2194b7c
to
ef46859
Compare
…, fix a ton of bugs
…est_collect_fringe_from_other_thread, add _on_tick handler for Executor
sensitive_strings_allowed_binary_files_20240412_144750.csv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the critical sections for the threads?
+ f"It is suggested that you restrict outside access to port {port} of the host computer." | ||
) | ||
lt.info(f"Starting server on port {port}...") | ||
server = HTTPServer(("0.0.0.0", port), SofastServer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider storing "0.0.0.0" as a local variable above near where port
is defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this is a good idea and one I will implement.
Hey, sorry about the confusion. This PR isn't ready for review yet (if I assigned you already that was a mistake). I'll let you know when it is ready.
# The minimum time between server evaulation loops is determined by the GIL: | ||
# https://docs.python.org/3/library/sys.html#sys.setswitchinterval | ||
server_pool = ThreadPoolExecutor(max_workers=1) | ||
server_pool.submit(server.serve_forever) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if this thread crashes or throws an exception? Will the program exit cleanly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a valid concern and actually why I'm doing this work. The intent is to have a separate program that restarts the entire process if the server stops responding.
Closing as won't fix. |
No description provided.