我最近一年在用 sentry ( getsentry.com )这个软件,本来以为是基于 django 做的,但后来发现作者用自己的东西替换掉了 django 的很多组件,改过的部分都快够一个框架了
其中就有这么个 logan
https://github.com/getsentry/sentry/blob/7.7.4/src/sentry/utils/runner.py#L11
https://github.com/dcramer/logan
这个 logan 说是 a toolkit for running standalone Django applications. It provides you with tools to create a CLI runner, manage settings, and the ability to bootstrap the process.
但我没明白这和直接在 django commands 里写个 start 命令启动 gunicorn 又有什么区别呢?
这里
https://github.com/getsentry/raven-python/issues/711
提到需要用 logan 的 configure()函数初始化 CLI 应用,而不是只设置好 django 环境变量就可以了
看起来是有点儿玄机啊
不过我看不懂……求点拨,到底 django 哪儿不好, logan 又解决了哪点儿不好?
其中就有这么个 logan
https://github.com/getsentry/sentry/blob/7.7.4/src/sentry/utils/runner.py#L11
https://github.com/dcramer/logan
这个 logan 说是 a toolkit for running standalone Django applications. It provides you with tools to create a CLI runner, manage settings, and the ability to bootstrap the process.
但我没明白这和直接在 django commands 里写个 start 命令启动 gunicorn 又有什么区别呢?
这里
https://github.com/getsentry/raven-python/issues/711
提到需要用 logan 的 configure()函数初始化 CLI 应用,而不是只设置好 django 环境变量就可以了
看起来是有点儿玄机啊
不过我看不懂……求点拨,到底 django 哪儿不好, logan 又解决了哪点儿不好?