# Generated by Django 4.0.7 on 2022-10-15 18:29

import uuid

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("taskmonitor", "0003_queuedtask"),
    ]

    operations = [
        migrations.AddField(
            model_name="tasklog",
            name="args",
            field=models.JSONField(
                default=list,
                help_text="Positional arguments the task was called with. Nested items might be truncated to [] or {}.",
            ),
        ),
        migrations.AddField(
            model_name="tasklog",
            name="kwargs",
            field=models.JSONField(
                default=dict,
                help_text="Keyword arguments the task was called with. Nested items might be truncated to [] or {}.",
            ),
        ),
        migrations.AddField(
            model_name="tasklog",
            name="result",
            field=models.JSONField(
                default=None, help_text="Result of the task.", null=True
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="app_name",
            field=models.CharField(
                db_index=True,
                help_text="Name of the app this task belongs to.",
                max_length=255,
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="exception",
            field=models.TextField(help_text="Message of the raised exception if any."),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="parent_id",
            field=models.UUIDField(
                default=None, help_text="ID of the parent task if any.", null=True
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="priority",
            field=models.IntegerField(
                default=None,
                help_text="Priority this task was executed with.",
                null=True,
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="received",
            field=models.DateTimeField(
                default=None,
                help_text="When a task is received from the broker and is ready for execution.",
                null=True,
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="retries",
            field=models.IntegerField(help_text="Number of retries."),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="runtime",
            field=models.FloatField(
                db_index=True,
                default=None,
                help_text="Runtime of this task in seconds.",
                null=True,
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="started",
            field=models.DateTimeField(
                default=None, help_text="When the task execution started.", null=True
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="state",
            field=models.IntegerField(
                choices=[(1, "success"), (2, "retry"), (3, "failure")],
                db_index=True,
                help_text="Task's state when it was logged.",
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="task_id",
            field=models.UUIDField(
                db_index=True, default=uuid.uuid4, help_text="Unique ID of this task."
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="task_name",
            field=models.CharField(
                db_index=True, help_text="Name of this task.", max_length=255
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="timestamp",
            field=models.DateTimeField(
                db_index=True, help_text="Timestamp when this log was created."
            ),
        ),
        migrations.AlterField(
            model_name="tasklog",
            name="traceback",
            field=models.TextField(
                help_text="Full stack trace if there was an exception."
            ),
        ),
    ]
