stop writing database rows that are eating up a bunch of disk.
parent
625a9fd9d3
commit
e10ac91cde
|
@ -36,5 +36,6 @@ class DeviceMetricsEndpoint(PublicEndpoint):
|
|||
core_metric = CoreMetric(
|
||||
device_id=self.device_id, metric_type=metric, metric_value=self.request.json
|
||||
)
|
||||
core_metrics_repo = CoreMetricRepository(self.db)
|
||||
core_metrics_repo.add(core_metric)
|
||||
# Writing metrics from devices is being deactivated to enable
|
||||
# core_metrics_repo = CoreMetricRepository(self.db)
|
||||
# core_metrics_repo.add(core_metric)
|
||||
|
|
|
@ -97,8 +97,12 @@ def add_api_metric(http_status):
|
|||
http_status=int(http_status),
|
||||
url=global_context.url,
|
||||
)
|
||||
metric_repository = ApiMetricsRepository(global_context.db)
|
||||
metric_repository.add(api_metric)
|
||||
# Writing the API metrics to the database is disabled here to facilitate
|
||||
# reducing the size of the production database. Uncomment the below to
|
||||
# reactivate.
|
||||
#
|
||||
# metric_repository = ApiMetricsRepository(global_context.db)
|
||||
# metric_repository.add(api_metric)
|
||||
|
||||
|
||||
def update_device_last_contact():
|
||||
|
|
Loading…
Reference in New Issue