forked from LBRYCommunity/lbry-sdk
Merge remote-tracking branch 'origin/linux_analytics'
This commit is contained in:
commit
4b766eeea9
4 changed files with 11 additions and 1 deletions
|
@ -59,6 +59,7 @@ at anytime.
|
||||||
* integration tests for bootstrapping the dht
|
* integration tests for bootstrapping the dht
|
||||||
* configurable `concurrent_announcers` and `s3_headers_depth` settings
|
* configurable `concurrent_announcers` and `s3_headers_depth` settings
|
||||||
* `peer_ping` command
|
* `peer_ping` command
|
||||||
|
* linux distro and desktop name added to analytics
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
* `announce_all` argument from `blob_announce`
|
* `announce_all` argument from `blob_announce`
|
||||||
|
|
|
@ -185,7 +185,7 @@ class Manager(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _make_context(platform, wallet):
|
def _make_context(platform, wallet):
|
||||||
return {
|
context = {
|
||||||
'app': {
|
'app': {
|
||||||
'name': 'lbrynet',
|
'name': 'lbrynet',
|
||||||
'version': platform['lbrynet_version'],
|
'version': platform['lbrynet_version'],
|
||||||
|
@ -206,6 +206,10 @@ class Manager(object):
|
||||||
'version': '1.0.0'
|
'version': '1.0.0'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
if 'desktop' in platform and 'distro' in platform:
|
||||||
|
context['os']['desktop'] = platform['desktop']
|
||||||
|
context['os']['distro'] = platform['distro']
|
||||||
|
return context
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _if_deferred(maybe_deferred, callback, *args, **kwargs):
|
def _if_deferred(maybe_deferred, callback, *args, **kwargs):
|
||||||
|
|
|
@ -36,6 +36,10 @@ def get_platform(get_ip=True):
|
||||||
"lbryschema_version": lbryschema_version,
|
"lbryschema_version": lbryschema_version,
|
||||||
"build": build_type.BUILD, # CI server sets this during build step
|
"build": build_type.BUILD, # CI server sets this during build step
|
||||||
}
|
}
|
||||||
|
if p["os_system"] == "Linux":
|
||||||
|
import distro
|
||||||
|
p["distro"] = distro.info()
|
||||||
|
p["desktop"] = os.environ.get('XDG_CURRENT_DESKTOP', 'Unknown')
|
||||||
|
|
||||||
# TODO: remove this from get_platform and add a get_external_ip function using treq
|
# TODO: remove this from get_platform and add a get_external_ip function using treq
|
||||||
if get_ip:
|
if get_ip:
|
||||||
|
|
1
setup.py
1
setup.py
|
@ -17,6 +17,7 @@ from setuptools import setup, find_packages
|
||||||
requires = [
|
requires = [
|
||||||
'Twisted',
|
'Twisted',
|
||||||
'appdirs',
|
'appdirs',
|
||||||
|
'distro',
|
||||||
'base58',
|
'base58',
|
||||||
'envparse',
|
'envparse',
|
||||||
'jsonrpc',
|
'jsonrpc',
|
||||||
|
|
Loading…
Add table
Reference in a new issue