mirror of
https://github.com/lubuntu-team/metrics.git
synced 2025-05-07 02:21:28 +00:00
Remove some verbosity added when debugging.
This commit is contained in:
parent
6f68733ca1
commit
b61faebe7a
4
metrics
4
metrics
@ -90,9 +90,9 @@ def main(module):
|
|||||||
for day in (1, 7, 30, 90, 180):
|
for day in (1, 7, 30, 90, 180):
|
||||||
# Fetch the data and log to debug
|
# Fetch the data and log to debug
|
||||||
run = [module.sqlite_time_range(days=day)]
|
run = [module.sqlite_time_range(days=day)]
|
||||||
log.info(run)
|
log.debug(run)
|
||||||
data = sqlite_run(run, db=args.db_location, return_output=True)
|
data = sqlite_run(run, db=args.db_location, return_output=True)
|
||||||
log.info(data)
|
log.debug(data)
|
||||||
|
|
||||||
# Render the template, which also returns the average values
|
# Render the template, which also returns the average values
|
||||||
_averages[day] = module.render_template(day, data)
|
_averages[day] = module.render_template(day, data)
|
||||||
|
@ -83,7 +83,6 @@ class DiscourseModule:
|
|||||||
on_page = len(topics)
|
on_page = len(topics)
|
||||||
page += 1
|
page += 1
|
||||||
|
|
||||||
print("Working on " + category["name"])
|
|
||||||
for topic in topics:
|
for topic in topics:
|
||||||
# Increment total_all
|
# Increment total_all
|
||||||
data[4] += 1
|
data[4] += 1
|
||||||
@ -138,7 +137,6 @@ class DiscourseModule:
|
|||||||
date = "strftime('%s', 'now')"
|
date = "strftime('%s', 'now')"
|
||||||
|
|
||||||
# Craft the str
|
# Craft the str
|
||||||
print(data)
|
|
||||||
command = "INSERT INTO discourse VALUES ("
|
command = "INSERT INTO discourse VALUES ("
|
||||||
command += "{}, {}, {}, {}, {}, {}, {});".format(date, *data)
|
command += "{}, {}, {}, {}, {}, {}, {});".format(date, *data)
|
||||||
|
|
||||||
@ -176,7 +174,6 @@ class DiscourseModule:
|
|||||||
|
|
||||||
# Use a lambda to map the data into a dict with the keys
|
# Use a lambda to map the data into a dict with the keys
|
||||||
for row in data:
|
for row in data:
|
||||||
print(row)
|
|
||||||
_data = {keys[x] : row[x] for x in range(len(row))}
|
_data = {keys[x] : row[x] for x in range(len(row))}
|
||||||
|
|
||||||
# Add our ephemeral dict to the master dict, and create the key if
|
# Add our ephemeral dict to the master dict, and create the key if
|
||||||
|
Loading…
x
Reference in New Issue
Block a user