mirror of
https://github.com/lubuntu-team/metrics.git
synced 2025-05-01 15:41:28 +00:00
Add --no-modify-db option for testing deployment and such.
This commit is contained in:
parent
5c486a878a
commit
c8f17940eb
7
metrics
7
metrics
@ -90,8 +90,9 @@ def main(module):
|
|||||||
module = module()
|
module = module()
|
||||||
|
|
||||||
# Stage the setup commands to be ran and run them
|
# Stage the setup commands to be ran and run them
|
||||||
run = [module.sqlite_setup(), module.sqlite_add()]
|
if not args.no_modify_db:
|
||||||
log.debug(sqlite_run(run, db=args.db_location))
|
run = [module.sqlite_setup(), module.sqlite_add()]
|
||||||
|
log.debug(sqlite_run(run, db=args.db_location))
|
||||||
|
|
||||||
# This is going to be a dict of tuples, with the key being the day and
|
# This is going to be a dict of tuples, with the key being the day and
|
||||||
# the value being a tuple with the averages
|
# the value being a tuple with the averages
|
||||||
@ -120,6 +121,8 @@ if __name__ == "__main__":
|
|||||||
help="Specify the location for the SQLite database")
|
help="Specify the location for the SQLite database")
|
||||||
parser.add_argument("--log", type=str, default="WARNING",
|
parser.add_argument("--log", type=str, default="WARNING",
|
||||||
help="Default logging level")
|
help="Default logging level")
|
||||||
|
parser.add_argument("--no-modify-db", action="store_true",
|
||||||
|
help="Don't insert any data into the DB, just read")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Ensure the logging level is set properly
|
# Ensure the logging level is set properly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user