diff --git a/lbrynet/conf.py b/lbrynet/conf.py index 764dbe788..eeac4f88e 100644 --- a/lbrynet/conf.py +++ b/lbrynet/conf.py @@ -241,8 +241,8 @@ class ApplicationSettings(Settings): self.LOGGLY_TOKEN = 'LJEzATH4AzRgAwxjAP00LwZ2YGx3MwVgZTMuBQZ3MQuxLmOv' self.ANALYTICS_ENDPOINT = 'https://api.segment.io/v1' self.ANALYTICS_TOKEN = 'Ax5LZzR1o3q3Z3WjATASDwR5rKyHH0qOIRIbLmMXn2H=' - self.SLACK_WEBHOOK = 'nUE0pUZ6Yl9bo29epl5moTSwnl5wo20ip2IlqzywMKZiIQSFZR5' + \ - 'AHx4mY0VmF0WQZ1ESEP9kMHZlp1WzJwWOoKN3ImR1M2yUAaMyqGZ=' + self.SLACK_WEBHOOK = ('nUE0pUZ6Yl9bo29epl5moTSwnl5wo20ip2IlqzywMKZiIQSFZR5' + 'AHx4mY0VmF0WQZ1ESEP9kMHZlp1WzJwWOoKN3ImR1M2yUAaMyqGZ=') self.DB_REVISION_FILE_NAME = 'db_revision' Settings.__init__(self) diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index f6b5efb99..9f32d3643 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -2645,22 +2645,22 @@ class _GetFileHelper(object): def loggly_time_string(dt): formatted_dt = dt.strftime("%Y-%m-%dT%H:%M:%S") - microseconds = str(round(dt.microsecond * (10.0**-5), 3)) - return urllib.quote_plus(formatted_dt + microseconds + "Z") + milliseconds = str(round(dt.microsecond * (10.0**-5), 3)) + return urllib.quote_plus(formatted_dt + milliseconds + "Z") def get_loggly_query_string(lbry_id): decoded_id = base58.b58encode(lbry_id) - base_loggly_search_url = "https://lbry.loggly.com/search#terms=json.lbry_id%3A" + base_loggly_search_url = "https://lbry.loggly.com/search#" now = utils.now() yesterday = now - utils.timedelta(days=1) - params = ( - decoded_id[:SHORT_ID_LEN], - loggly_time_string(yesterday), - loggly_time_string(now) - ) - formatted_params = "%s*&from=%s&until=%s&source_group=" % params - return base_loggly_search_url + formatted_params + params = { + 'terms': 'json.lbry_id:{}*'.format(decoded_id[:SHORT_ID_LEN]), + 'from': loggly_time_string(yesterday), + 'to': loggly_time_string(now) + } + data = urllib.urlencode(params) + return base_loggly_search_url + data def report_bug_to_slack(message, lbry_id, platform_name, app_version):