diff --git a/atdb/taskdatabase/migrations/0007_auto_20211214_0941.py b/atdb/taskdatabase/migrations/0007_auto_20211214_0941.py new file mode 100644 index 0000000000000000000000000000000000000000..6b2df4ccbc8cd71ec93f0225fd18886ce92e8d47 --- /dev/null +++ b/atdb/taskdatabase/migrations/0007_auto_20211214_0941.py @@ -0,0 +1,33 @@ +# Generated by Django 3.1.4 on 2021-12-14 08:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('taskdatabase', '0006_configuration_filter'), + ] + + operations = [ + migrations.AddField( + model_name='task', + name='meta_scheduling', + field=models.JSONField(blank=True, null=True), + ), + migrations.AddField( + model_name='workflow', + name='meta_scheduling', + field=models.JSONField(blank=True, null=True), + ), + migrations.AlterField( + model_name='task', + name='resume', + field=models.BooleanField(default=True, verbose_name='Resume'), + ), + migrations.AlterField( + model_name='task', + name='sas_id', + field=models.CharField(blank=True, max_length=15, null=True, verbose_name='SAS_ID'), + ), + ] diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py index d0a038c096720680d205f12b13f0bcd0f0786dd1..a514a48bf33e011e3461ef9fccd43c8f45607bce 100644 --- a/atdb/taskdatabase/models.py +++ b/atdb/taskdatabase/models.py @@ -12,6 +12,7 @@ class Workflow(models.Model): commit_id = models.CharField(max_length=15, blank=True, null=True) path = models.CharField(max_length=100, blank=True, null=True) oi_size_fraction = models.FloatField(blank=True, null=True) + meta_scheduling = models.JSONField(null=True, blank=True) def __str__(self): return str(self.id) @@ -39,6 +40,8 @@ class Task(models.Model): outputs = models.JSONField(null=True, blank=True) metrics = models.JSONField(null=True, blank=True) + meta_scheduling = models.JSONField(null=True, blank=True) + size_to_process = models.PositiveBigIntegerField(default=0, null=True, blank=True) size_processed = models.PositiveBigIntegerField(default=0, null=True, blank=True) total_processing_time = models.IntegerField(default=0, null=True, blank=True) diff --git a/atdb/taskdatabase/serializers.py b/atdb/taskdatabase/serializers.py index 5fc918aa26c0c9d3efe2d3c751c1b632fb085f48..7d855767051d16bf2d8980f433117f1af83bd8cd 100644 --- a/atdb/taskdatabase/serializers.py +++ b/atdb/taskdatabase/serializers.py @@ -73,6 +73,7 @@ class TaskWriteSerializer(serializers.ModelSerializer): task.save() return task + class TaskReadSerializer(serializers.ModelSerializer): status_history = serializers.StringRelatedField( @@ -100,7 +101,7 @@ class TaskReadSerializer(serializers.ModelSerializer): 'status','new_status', 'inputs','outputs','metrics','status_history', 'size_to_process', 'size_processed', 'total_processing_time', - 'log_entries' + 'log_entries','meta_scheduling' ] read_only_fields = fields diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index c0720e8fcc2e48cd6fd43ee2581d46e17f1d17a6..914b469d2eddecabdc9ccc49306b9746a410a934 100644 --- a/atdb/taskdatabase/templates/taskdatabase/index.html +++ b/atdb/taskdatabase/templates/taskdatabase/index.html @@ -80,7 +80,7 @@ {% include 'taskdatabase/pagination.html' %} </div> </div> - <p class="footer"> Version 1.0.0 (29 oct 2021 - 14:00) + <p class="footer"> Version 1.0.0 (14 dec 2021 - 10:00) </div>