MCPcopy
hub / github.com/plotly/dash / target

Method target

dash/testing/application_runners.py:244–266  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

242 self.port = kwargs.get("port", 8050)
243
244 def target():
245 app.scripts.config.serve_locally = True
246 app.css.config.serve_locally = True
247
248 options = kwargs.copy()
249
250 try:
251 module = app.server.__class__.__module__
252 # FastAPI support
253 if module.startswith("fastapi"):
254 app.run(**options)
255 # Quart support (ASGI - runs its own async event loop)
256 elif module.startswith("quart"):
257 app.run(**options)
258 # Flask fallback (WSGI - needs threaded mode)
259 else:
260 app.run(threaded=True, **options)
261 except SystemExit:
262 logger.info("Server stopped")
263 raise
264 except Exception as error:
265 logger.exception(error)
266 raise error
267
268 self.proc = multiprocess.Process(target=target) # type: ignore[reportAttributeAccessIssue]; pylint: disable=not-callable
269 self.proc.start()

Callers 2

RFunction · 0.80
MFunction · 0.80

Calls 2

copyMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected