mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 10:46:06 +02:00
Remove timer
This commit is contained in:
parent
b5784a1a88
commit
ca2e2168aa
5 changed files with 114 additions and 103 deletions
|
@ -2029,7 +2029,6 @@ class DomainAdmin(ListHeaderAdmin):
|
||||||
|
|
||||||
def change_view(self, request, object_id):
|
def change_view(self, request, object_id):
|
||||||
logger.info("Timing change_view on domain")
|
logger.info("Timing change_view on domain")
|
||||||
with Timer():
|
|
||||||
# If the analyst was recently editing a domain page,
|
# If the analyst was recently editing a domain page,
|
||||||
# delete any associated session values
|
# delete any associated session values
|
||||||
if "analyst_action" in request.session:
|
if "analyst_action" in request.session:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated by Django 4.2.10 on 2024-05-06 20:21
|
# Generated by Django 4.2.10 on 2024-05-07 20:13
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
import phonenumber_field.modelfields
|
import phonenumber_field.modelfields
|
||||||
|
@ -92,6 +92,10 @@ class Migration(migrations.Migration):
|
||||||
model_name="domain",
|
model_name="domain",
|
||||||
index=models.Index(fields=["name"], name="registrar_d_name_5b1956_idx"),
|
index=models.Index(fields=["name"], name="registrar_d_name_5b1956_idx"),
|
||||||
),
|
),
|
||||||
|
migrations.AddIndex(
|
||||||
|
model_name="domaininvitation",
|
||||||
|
index=models.Index(fields=["status"], name="registrar_d_status_e84571_idx"),
|
||||||
|
),
|
||||||
migrations.AddIndex(
|
migrations.AddIndex(
|
||||||
model_name="domainrequest",
|
model_name="domainrequest",
|
||||||
index=models.Index(fields=["requested_domain"], name="registrar_d_request_6894eb_idx"),
|
index=models.Index(fields=["requested_domain"], name="registrar_d_request_6894eb_idx"),
|
||||||
|
|
|
@ -15,6 +15,12 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class DomainInvitation(TimeStampedModel):
|
class DomainInvitation(TimeStampedModel):
|
||||||
|
class Meta:
|
||||||
|
"""Contains meta information about this class"""
|
||||||
|
indexes = [
|
||||||
|
models.Index(fields=["status"]),
|
||||||
|
]
|
||||||
|
|
||||||
# Constants for status field
|
# Constants for status field
|
||||||
class DomainInvitationStatus(models.TextChoices):
|
class DomainInvitationStatus(models.TextChoices):
|
||||||
INVITED = "invited", "Invited"
|
INVITED = "invited", "Invited"
|
||||||
|
|
|
@ -24,6 +24,13 @@ class User(AbstractUser):
|
||||||
but can be customized later.
|
but can be customized later.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
"""Contains meta information about this class"""
|
||||||
|
indexes = [
|
||||||
|
models.Index(fields=["username"]),
|
||||||
|
models.Index(fields=["email"]),
|
||||||
|
]
|
||||||
|
|
||||||
class VerificationTypeChoices(models.TextChoices):
|
class VerificationTypeChoices(models.TextChoices):
|
||||||
"""
|
"""
|
||||||
Users achieve access to our system in a few different ways.
|
Users achieve access to our system in a few different ways.
|
||||||
|
|
|
@ -380,7 +380,6 @@ def write_csv_for_requests(
|
||||||
def export_data_type_to_csv(csv_file):
|
def export_data_type_to_csv(csv_file):
|
||||||
"""All domains report with extra columns"""
|
"""All domains report with extra columns"""
|
||||||
logger.info("Timing export_data_type_to_csv")
|
logger.info("Timing export_data_type_to_csv")
|
||||||
with Timer():
|
|
||||||
writer = csv.writer(csv_file)
|
writer = csv.writer(csv_file)
|
||||||
# define columns to include in export
|
# define columns to include in export
|
||||||
columns = [
|
columns = [
|
||||||
|
@ -420,8 +419,6 @@ def export_data_type_to_csv(csv_file):
|
||||||
def export_data_full_to_csv(csv_file):
|
def export_data_full_to_csv(csv_file):
|
||||||
"""All domains report"""
|
"""All domains report"""
|
||||||
|
|
||||||
logger.info("Timing def export_data_full_to_csv")
|
|
||||||
with Timer():
|
|
||||||
writer = csv.writer(csv_file)
|
writer = csv.writer(csv_file)
|
||||||
# define columns to include in export
|
# define columns to include in export
|
||||||
columns = [
|
columns = [
|
||||||
|
@ -454,8 +451,6 @@ def export_data_full_to_csv(csv_file):
|
||||||
|
|
||||||
def export_data_federal_to_csv(csv_file):
|
def export_data_federal_to_csv(csv_file):
|
||||||
"""Federal domains report"""
|
"""Federal domains report"""
|
||||||
logger.info("Timing def export_data_federal_to_csv")
|
|
||||||
with Timer():
|
|
||||||
writer = csv.writer(csv_file)
|
writer = csv.writer(csv_file)
|
||||||
# define columns to include in export
|
# define columns to include in export
|
||||||
columns = [
|
columns = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue