-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] docs: add example for non disposable daemons #304
Conversation
You need to init and start, check the link below |
Why not autostart ou autoinit if neither have happened so far?? |
I would think whoever introduce this behaviour, tried to make disposable fully automated and non-disposable the flexible version. You just need to pass It's just the way it works and is documented right now, we can make an issue about it and change the behaviour. |
|
That is bug then! can you make an issue about it pls? i'll look into it ASAP |
Can we treat this PR as the issue? Or you prefer me to open another issue? |
src/factory-daemon.js
Outdated
(cb) => options.init | ||
? node.init(options.initOptions, cb) | ||
: cb(null, node), | ||
// TODO if start fails, check if it was because there | ||
// is a daemon already running and connect to it instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just needs a bunch of checks here :)
@@ -98,8 +98,6 @@ class FactoryDaemon { | |||
|
|||
if (!options.disposable) { | |||
const nonDisposableConfig = clone(defaultConfig) | |||
options.init = false | |||
options.start = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was what was making it not start even if passed the options
758501d
to
b355ca3
Compare
if (err) { | ||
console.log(err) | ||
// TODO if start fails, check if it was because there | ||
// is a daemon already running and connect to it instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would appreciate some brainstorming on this one. Would the best just to move this func out https://github.com/ipfs/js-ipfsd-ctl/blob/master/src/ipfsd-daemon.js#L229-L234 and if the daemon is running, catch the addr from the api
file in the repo?
@diasdavid can you check #308 related to this. |
d3640ee
to
db6375f
Compare
doesn't apply anymore version 1.0.0 fixed this problem. |
The non-disposable daemons option is currently not working. It errors silently.
Steps to reproduce:
Result
It should spawn a go and js daemons on top of .ipfs and .jsipfs respectively and run the .id call without a problem.