Git Product home page Git Product logo

Comments (17)

rawkode avatar rawkode commented on May 23, 2024 1

Sorry, I see; it's a branch. I'll give it a try 👍

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on May 23, 2024

Hi,

I could resurrect the code I used before, that would let the user start the app before the user's, and pass a custom configuration.

Your problem, if I understand correctly, is that you want to configure bolt_sips using :wave? Didn't hear about :wave till now, sorry. I'll try to find the time and look into this, unless you already have a PR? :)

Florin

from bolt_sips.

rawkode avatar rawkode commented on May 23, 2024

I think I have a version working. I'll PR it when I've done more testing 👍

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on May 23, 2024

Awesome! Thank you!!

from bolt_sips.

rawkode avatar rawkode commented on May 23, 2024

OK, I thought I had this; but unfortunately I don't. Help appreciated 👍

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on May 23, 2024

Hi David - can you please check v0.3.1? Now, you can do something like this:

 def application do
    # Specify extra applications you'll use from Erlang/Elixir
    [ extra_applications: [:logger], mod: 
      {Bolt.Sips.Application, [url: 'localhost', pool_size: 15]}
    ]
  end

Please let me know if this version can be used with weave.

HTH

from bolt_sips.

rawkode avatar rawkode commented on May 23, 2024

Hi @florinpatrascu, nothing above 2.4.6 seems published to hex?

from bolt_sips.

rawkode avatar rawkode commented on May 23, 2024

Hi @florinpatrascu,

OK; I've found the problem.

Firstly, I need to stop :bolt_sips starting automatically, as it needs configured before launch.

For this, I added app: :false to the deps and that seems great.

I then add worker(Bolt.Sips, [Application.get_env(:bolt_sips, Bolt)]) to my application supervisor and things begin to break.

It turns out, once my app adds the worker and calls start_link on Bolt.Sips, the following call blocks indefinitely:

ConCache.start_link([], name: :bolt_sips_cache)

Removing ConCache altogether gets it working for me.

from bolt_sips.

rawkode avatar rawkode commented on May 23, 2024

From what I can tell, this is a micro-optimisation anyway, with no real value. Perhaps we could remove it? Or is there something I'm missing?

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on May 23, 2024

David, np - can you please give me an example of how you would like to use :bolt_sips, with :weave? I am sure I am too missing something. This branch, 0.3.1 respectively, is allowing you to start Bolt.Sips from your app and also to specify configuration variables that will override your config/${MIX_ENV}.exs files. In this branch, :bolt_sips will not start automatically anymore. I thought that's what you wanted?!

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on May 23, 2024

also, you said before:

Firstly, I need to stop :bolt_sips starting automatically, as it needs configured before launch.

this is what 0.3.1 does, to start with

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on May 23, 2024

and if you don't mind, how can I replicate this:

[...] the following call blocks indefinitely:
ConCache.start_link([], name: :bolt_sips_cache)

many thanks, for your patience!

from bolt_sips.

rawkode avatar rawkode commented on May 23, 2024

You're right, 0.3.1 does fix this; awesome!

I know that environment variables can be injected too, but for delivering secrets, it's best to use other means: which is what I am using :weave for.

I'll put together a small application that demos my issue.

Thanks for your help

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on May 23, 2024

niceee!!! Glad it helps!!!
🍻

from bolt_sips.

rawkode avatar rawkode commented on May 23, 2024

0.3.1 works as needed. Thanks 👍

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on May 23, 2024

Awesome. Tonight, I'll publish the new version on hex.pm Thank you, for your feedback!

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on May 23, 2024

Package published to https://hex.pm/packages/bolt_sips/0.3.1

from bolt_sips.

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.