如何 运行 一个基于自定义 URI 的 Luigi 服务器

How to run a Luigi server against a custom URI

Luigi 服务器可以 运行 对抗 http://localhost:8082/so​​meString 吗?

Here 只是在 Dash 中执行相同操作的一种关键字便捷方式。我希望在 Luigi 中看到类似的方式。

我不认为你可以用 luigi 开箱即用,因为 that's how the server gets started,而且没有更改 URI 路径的选项

您可以添加代理来实现此目的,但之后您将不得不 启动 worker 时设置 --default-scheduler-url=http://localhost:8082/someStringSee the doc for the configuration

所以我自己想了个办法。首先,似乎没有外部方法可以做到这一点。我能做到的唯一方法是修改 luigi/server.py:

中的 this
299     handlers = [
300         (r'/api/(.*)', RPCHandler, {"scheduler": scheduler}),
301         (r'/someString', RootPathHandler, {'scheduler': scheduler}),

然后,curl -L http://localhost:8082/someString 工作正常。