Skip to content

Conversation

@bitphage
Copy link
Collaborator

@bitphage bitphage commented Feb 28, 2019

Closes #500

"dexbot" logger should use same verbosity settings defined for
per_worker logger and also it should log into file 'dexbot.log' too.
Plugins are python classes supposed to serve as workers to perform any additional
operations which are not performed from strategies. Example use-cases:

* Download trading history
* Analyze trading history
* Check for updates
* Report dexbot statistic

Current implementation uses separate thread and asyncio event loop
inside. This is a temporary solution before refactoring
WorkerInfrastructure to asyncio.

Closes: Codaone#500
@bitphage bitphage force-pushed the 500-plugin-infrastructure branch from db80b49 to 43092dc Compare February 28, 2019 14:57
self.update_notify()

def run(self):
self.plugins_thread = PluginInfrastructure(self.config)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initialize self.plugins_thread in __init__


log = logging.getLogger(__name__)

class PluginInfrastructure(threading.Thread):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add one extra line above, PEP8 error.

import dexbot.plugins
from dexbot.helper import iter_namespace

from bitshares import BitShares
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works but to be more specific change to from bitshares.bitshares import BitShares.

# Root logger also logs into stream and file with respect of cli-defined verbosity
logging.getLogger("dexbot").addHandler(ch)
logging.getLogger("dexbot").addHandler(fh)
logging.getLogger("dexbot").setLevel(getattr(logging, verbosity.upper()))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve conflict in ui.py

@Shaynomaino
Copy link

#502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants