Giter VIP home page Giter VIP logo

Comments (4)

hdecolle avatar hdecolle commented on July 29, 2024

The function is working now, I got back a cursor and forgot to pipe that into Enum.to_list

Now the only question is how to get to the pid.

from mongodb.

ankhers avatar ankhers commented on July 29, 2024

I think the answer is supposed to be MyApp.Repo.Pool, but that doesn't appear to be working.

This is ugly, and I am not going to guarantee that it is going to work all the time, but you can use the following code in order to get the pid of the actual mongo process.

MyApp.Repo |> :sys.get_state() |> get_in([Access.elem(3), Access.elem(1), Mongo, Access.elem(1)])

from mongodb.

hdecolle avatar hdecolle commented on July 29, 2024

Thank you, its ugly but it works.

Aside: I hope that I can also use that to access a mongodb on DigitalOcean.

from mongodb.

ankhers avatar ankhers commented on July 29, 2024

It shouldn't matter where your mongo database is hosted. As long as you are able to connect to it, the above should work in order to get the pid from the ecto adapter.

I am closing this as I believe we having a "working" solution. If there is anything else, please feel free to either reopen this issue or create a new one.

from mongodb.

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.