GithubHelp home page GithubHelp logo

Comments (5)

ydf0509 avatar ydf0509 commented on May 26, 2024

image

from funboost.

ydf0509 avatar ydf0509 commented on May 26, 2024

MONGO_CONNECT_URL 中声明的db无卵作用,不需要声明用什么db。
MONGO_CONNECT_URL 中的db无论你写什么,消费结果都是固定保存到 task_status 库,也就是说消费结果固定保存到 task_status ,完全和 MONGO_CONNECT_URL 中声明什么db毫无关系。

框架的mongomq作为消息队列会单独使用固定db名字,消费结果也会使用单独的固定db名字。MONGO_CONNECT_URL 中声明db毫无作用,用 ?authSource 代表权限鉴权db,这是mongo uri 自身语法。

from funboost.

ydf0509 avatar ydf0509 commented on May 26, 2024

MONGO_CONNECT_URL = 'mongodb://root:[email protected]:27017?authSource=admin' 你可以学习下mongo url的语法,authSource 代表鉴权db

from funboost.

RiskySignal avatar RiskySignal commented on May 26, 2024

我的意思是这个用户只有task_status库的权限,所以在URL就必须补上task_status,否则会报错:

pymongo.errors.OperationFailure: not authorized on task_status to execute command { update: "test_distribute_queue", ordered: true, lsid: { id: UUID("3a9467ee-5f8f-4904-8001-5515d9c5cf4b") }, $db: "task_status" }, full error: {'ok': 0.0, 'errmsg': 'not authorized on task_status to execute command { update: "test_distribute_queue", ordered: true, lsid: { id: UUID("3a9467ee-5f8f-4904-8001-5515d9c5cf4b") }, $db: "task_status" }', 'code': 13, 'codeName': 'Unauthorized'}

大佬,我觉得你在沟通中过于强势了,虽然没你了解的多,但我觉得你也可以了解我们是如何使用你的库的;

我是夸张语气说话,我说 “无卵作用“ 不代表愤怒,一定要很正规的说“没有作用”吗

from funboost.

ydf0509 avatar ydf0509 commented on May 26, 2024

那就声明吧。但是框架的mongomq 消息队列固定保存在consume_queus db中,消费结果固定保存到task_status db中,如果你同事使用mongo作为消息队列,又使用mongo存储消费结果,MONGO_CONNECT_URL 该如何声明呢?应该找运维加下权限吧。

from funboost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.