Skip to content

Commit

Permalink
Merge pull request #34991 from dimagi/gh/repeaters/add-duration-to-re…
Browse files Browse the repository at this point in the history
…quest-log

Add duration field to RequestLog
  • Loading branch information
gherceg authored Aug 19, 2024
2 parents 178ef45 + 26a5b71 commit e311466
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions corehq/motech/migrations/0015_requestlog_duration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.14 on 2024-08-17 18:04

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("motech", "0014_alter_connectionsettings_password"),
]

operations = [
migrations.AddField(
model_name="requestlog",
name="duration",
field=models.IntegerField(null=True),
),
]
1 change: 1 addition & 0 deletions corehq/motech/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ class RequestLog(models.Model):
response_status = models.IntegerField(null=True, db_index=True)
response_headers = jsonfield.JSONField(blank=True, null=True)
response_body = models.TextField(blank=True, null=True)
duration = models.IntegerField(null=True) # milliseconds

class Meta:
db_table = 'dhis2_jsonapilog'
Expand Down
1 change: 1 addition & 0 deletions migrations.lock
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ motech
0012_alter_connectionsettings_auth_type
0013_alter_connectionsettings_auth_type
0014_alter_connectionsettings_password
0015_requestlog_duration
notifications
0001_squashed_0003_auto_20160504_2049 (3 squashed migrations)
0002_auto_20160505_2058
Expand Down

0 comments on commit e311466

Please sign in to comment.