-
Notifications
You must be signed in to change notification settings - Fork 483
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
refactor lbrynet-daemon into modular components #1164
Conversation
91c4f7c
to
0a41924
Compare
@hackrush01 will you be using this PR or can we close it? |
0a41924
to
1b005cf
Compare
@tzarebczan I'll be using this. |
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.
The wallet component looks good.
Next, you should add a dht_node
component to used by Session
(if a Node
object is provided as an argument Session should use it instead of making one and starting it). Once you've got the dht_node component, Session
can be made into a component too, followed by the file manager.
lbrynet/daemon/Daemon.py
Outdated
d.addCallback(create_session) | ||
return defer.succeed(True) | ||
|
||
d = create_session(self.wallet) |
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.
create_session
doesn't need to be a function, you can just return self.session.setup()
instead of having a callback.
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.
👍
lbrynet/daemon/Daemon.py
Outdated
migrated = yield self._check_db_migration() | ||
yield self.storage.setup() | ||
yield self.component_manager.setup() | ||
self.storage = self.component_manager.get_component("database").storage |
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.
@hackrush01 you can remove this since you've removed the references to Daemon.storage (to use Daemon.session.storage)
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.
self.storage
is still needed here
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.
Removed in the latest commit
77cbb63
to
fa0c9cb
Compare
6327c0d also fixes a regression which caused
|
5570bad
to
8ac1940
Compare
285d26f
to
ab5fd64
Compare
No description provided.