Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated web interface to use cached performance data.
* Renamed management commands to use pdk_ prefix.
- Loading branch information
1 parent
0d7740d
commit f6805be
Showing
17 changed files
with
316 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# pylint: disable=no-member | ||
|
||
from django.core.management.base import BaseCommand | ||
|
||
from ...decorators import handle_lock | ||
from ...models import DataSource | ||
|
||
class Command(BaseCommand): | ||
help = 'Updates each user performance metadata measurements on a round-robin basis' | ||
|
||
@handle_lock | ||
def handle(self, *args, **options): | ||
source = DataSource.objects.filter(performance_metadata_updated=None).first() | ||
|
||
if source is None: | ||
source = DataSource.objects.all().order_by('performance_metadata_updated').first() | ||
|
||
source.update_performance_metadata() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.1 on 2017-07-31 19:39 | ||
# pylint: skip-file | ||
|
||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('passive_data_kit', '0019_datasourcealert_alert_level'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterIndexTogether( | ||
name='datapoint', | ||
index_together=set([('source', 'generator_identifier', 'created'), ('source', 'generator_identifier')]), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.1 on 2017-07-31 20:11 | ||
# pylint: skip-file | ||
|
||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('passive_data_kit', '0020_auto_20170731_1939'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterIndexTogether( | ||
name='datapoint', | ||
index_together=set([('source', 'generator_identifier', 'secondary_identifier'), ('source', 'generator_identifier', 'secondary_identifier', 'created'), ('generator_identifier', 'secondary_identifier', 'recorded'), ('source', 'generator_identifier', 'secondary_identifier', 'recorded'), ('generator_identifier', 'secondary_identifier'), ('generator_identifier', 'created', 'recorded'), ('source', 'generator_identifier', 'created'), ('source', 'generator_identifier'), ('source', 'generator_identifier', 'created', 'recorded'), ('generator_identifier', 'secondary_identifier', 'created', 'recorded'), ('generator_identifier', 'created'), ('generator_identifier', 'recorded'), ('source', 'generator_identifier', 'secondary_identifier', 'created', 'recorded'), ('generator_identifier', 'secondary_identifier', 'created'), ('source', 'generator_identifier', 'recorded')]), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.1 on 2017-07-31 21:33 | ||
# pylint: skip-file | ||
|
||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('passive_data_kit', '0021_auto_20170731_2011'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='datasourcealert', | ||
name='active', | ||
field=models.BooleanField(db_index=True, default=True), | ||
), | ||
migrations.AlterField( | ||
model_name='datasourcealert', | ||
name='alert_level', | ||
field=models.CharField(choices=[('info', 'Informative'), ('warning', 'Warning'), ('critical', 'Critical')], db_index=True, default='info', max_length=64), | ||
), | ||
migrations.AlterField( | ||
model_name='datasourcealert', | ||
name='created', | ||
field=models.DateTimeField(db_index=True), | ||
), | ||
migrations.AlterField( | ||
model_name='datasourcealert', | ||
name='updated', | ||
field=models.DateTimeField(blank=True, db_index=True, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.1 on 2017-07-31 21:37 | ||
# pylint: skip-file | ||
|
||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('passive_data_kit', '0022_auto_20170731_2133'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterIndexTogether( | ||
name='datapoint', | ||
index_together=set([('source', 'generator_identifier', 'secondary_identifier'), ('generator_identifier', 'recorded'), ('source', 'generator_identifier'), ('generator_identifier', 'secondary_identifier', 'recorded'), ('source', 'created'), ('generator_identifier', 'secondary_identifier'), ('source', 'generator_identifier', 'secondary_identifier', 'recorded'), ('source', 'generator_identifier', 'secondary_identifier', 'created'), ('generator_identifier', 'created', 'recorded'), ('source', 'generator_identifier', 'created'), ('generator_identifier', 'secondary_identifier', 'created'), ('source', 'generator_identifier', 'created', 'recorded'), ('generator_identifier', 'created'), ('generator_identifier', 'secondary_identifier', 'created', 'recorded'), ('source', 'generator_identifier', 'secondary_identifier', 'created', 'recorded'), ('source', 'generator_identifier', 'recorded')]), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.1 on 2017-07-31 21:50 | ||
# pylint: skip-file | ||
|
||
from __future__ import unicode_literals | ||
|
||
import django.contrib.postgres.fields.jsonb | ||
from django.db import migrations, models | ||
|
||
from ..models import install_supports_jsonfield | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('passive_data_kit', '0023_auto_20170731_2137'), | ||
] | ||
|
||
if install_supports_jsonfield(): | ||
operations = [ | ||
migrations.AddField( | ||
model_name='datasource', | ||
name='performance_metadata', | ||
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True), | ||
), | ||
] | ||
else: | ||
operations = [ | ||
migrations.AddField( | ||
model_name='datasource', | ||
name='performance_metadata', | ||
field=models.TextField(max_length=(32 * 1024 * 1024 * 1024), blank=True, null=True) | ||
), | ||
] |
22 changes: 22 additions & 0 deletions
22
migrations/0025_datasource_performance_metadata_updated.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.1 on 2017-07-31 22:13 | ||
# pylint: skip-file | ||
|
||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('passive_data_kit', '0024_datasource_performance_metadata'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='datasource', | ||
name='performance_metadata_updated', | ||
field=models.DateTimeField(blank=True, db_index=True, null=True), | ||
), | ||
] |
Oops, something went wrong.