Skip to content

Commit 02be713

Browse files
authored
Delete processor_runs from RunEntry (#266)
1 parent 71715e2 commit 02be713

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Django 4.2.14 on 2024-08-08 22:33
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('apiabstractor', '0008_runentry_processor_runs_objref_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.RemoveField(
14+
model_name='runentry',
15+
name='processor_runs',
16+
),
17+
]

llmstack/processors/models.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
import uuid
44

55
from django.contrib.auth.models import User
6-
from django.contrib.postgres.fields import ArrayField as PGArrayField
7-
from django.db import connection, models
6+
from django.db import models
87
from django.db.models.signals import pre_save
98
from django.dispatch import receiver
109

1110
from llmstack.assets.utils import get_asset_by_objref_internal
12-
from llmstack.common.utils.db_models import ArrayField
1311

1412
logger = logging.getLogger(__name__)
1513

@@ -403,21 +401,6 @@ class RunEntry(models.Model):
403401
blank=True,
404402
help_text="Response headers",
405403
)
406-
processor_runs = (
407-
PGArrayField(
408-
models.JSONField(
409-
default=dict,
410-
blank=True,
411-
),
412-
default=list,
413-
help_text="Array of processor data for each endpoint including input and output data",
414-
)
415-
if connection.vendor == "postgresql"
416-
else ArrayField(
417-
null=True,
418-
help_text="Array of processor data for each endpoint including input and output data",
419-
)
420-
)
421404
processor_runs_objref = models.CharField(
422405
default=None,
423406
blank=True,
@@ -457,7 +440,6 @@ def save(self, *args, **kwargs):
457440
# Clean the processor_runs field
458441
processor_runs = kwargs.pop("processor_runs", [])
459442
processor_runs_objref = self.create_processor_runs_objref(processor_runs)
460-
self.processor_runs = []
461443
self.processor_runs_objref = processor_runs_objref
462444
super(RunEntry, self).save(*args, **kwargs)
463445

0 commit comments

Comments
 (0)