Drop assignment of job event parent in favor of parent_uuid

* This eliminates the save lookup of the parent job event and
  associated memcached call(s)
* Removes some other legacy parent determination mechanisms
* Alternate way to query for the parent/child relationship
This commit is contained in:
Matthew Jones
2017-01-24 15:40:33 -05:00
parent b3f4f3bea5
commit 2af98e5f58
3 changed files with 36 additions and 68 deletions

View File

@@ -37,6 +37,12 @@ class Migration(migrations.Migration):
name='uuid',
field=models.CharField(default=b'', max_length=1024, editable=False),
),
# Job Parent Event UUID
migrations.AddField(
model_name='jobevent',
name='parent_uuid',
field=models.CharField(default=b'', max_length=1024, editable=False),
),
# Modify the HA Instance
migrations.RemoveField(
model_name='instance',
@@ -361,7 +367,7 @@ class Migration(migrations.Migration):
),
migrations.AlterIndexTogether(
name='jobevent',
index_together=set([('job', 'event'), ('job', 'parent'), ('job', 'start_line'), ('job', 'uuid'), ('job', 'end_line')]),
index_together=set([('job', 'event'), ('job', 'parent_uuid'), ('job', 'start_line'), ('job', 'uuid'), ('job', 'end_line')]),
),
# Tower state
migrations.CreateModel(