# Generated by Django 2.0 on 2017-12-05 02:34

import datetime
from django.db import migrations, models
from django.utils.timezone import utc


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='(automatic)')),
                ('modified_at', models.DateTimeField(auto_now=True, help_text='(automatic)')),
                ('label', models.CharField(help_text='(required) Name of task, normally the same as the callback string', max_length=255)),
                ('schedule', models.CharField(default='* * * * *', help_text='(required) Cron-format schedule for running the task', max_length=80)),
                ('last_run', models.DateTimeField(blank=True, default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=utc), help_text='(automatic)', null=True)),
                ('next_run', models.DateTimeField(blank=True, default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=utc), help_text='(automatic)', null=True)),
                ('enabled', models.BooleanField(default=True, help_text='(optional) If false, sisy will skip this task')),
                ('_func_info', models.TextField(blank=True, default='{}', help_text='(internal) Dictionary of callable function info, stored as JSON')),
                ('_extra_data', models.TextField(blank=True, default='{}', help_text='(internal) Dictionary of user data, stored as JSON.   Normally accessed only through the ``userdata`` property.')),
                ('wait_for_schedule', models.BooleanField(default=True, help_text='(optional) Should the task wait for its first cron schedule, or run immediately')),
                ('iterations', models.IntegerField(default=0, help_text='(optional) Run the task this many times, then kill it')),
                ('allow_overlap', models.BooleanField(default=True, help_text='(optional) Should sisy allow more than one instance of this task to run at once')),
                ('running', models.BooleanField(default=False, help_text='(automatic) Is a worker actually running the task at the moment')),
                ('start_running', models.DateTimeField(default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=utc), help_text='(optional) Date and time when task will start running')),
                ('end_running', models.DateTimeField(default=datetime.datetime(2217, 12, 31, 23, 59, tzinfo=utc), help_text='(optional) Date and time when task will stop running')),
            ],
        ),
    ]
