Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Exclusive django 3.1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
jarekwg committed Oct 5, 2020
1 parent 093d9b4 commit ea73190
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 36 deletions.
10 changes: 0 additions & 10 deletions CHANGES.rst

This file was deleted.

10 changes: 3 additions & 7 deletions src/django_dramatiq_pg/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
# Generated by Django 2.2.9 on 2020-02-16 23:57

import django.contrib.postgres.fields.jsonb
from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = []

operations = [
migrations.CreateModel(
name="QueuedJob",
name="BackgroundJob",
fields=[
("message_id", models.UUIDField(primary_key=True, serialize=False)),
("queue_name", models.TextField(default="default")),
Expand All @@ -29,8 +25,8 @@ class Migration(migrations.Migration):
),
),
("mtime", models.DateTimeField()),
("message", django.contrib.postgres.fields.jsonb.JSONField()),
("result", django.contrib.postgres.fields.jsonb.JSONField()),
("message", models.jsonb.JSONField()),
("result", models.jsonb.JSONField()),
("result_ttl", models.DateTimeField()),
],
options={"db_table": "queue", "managed": False},
Expand Down
15 changes: 0 additions & 15 deletions src/django_dramatiq_pg/migrations/0002_auto_20200329_2103.py

This file was deleted.

6 changes: 2 additions & 4 deletions src/django_dramatiq_pg/models.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from django.contrib.postgres.fields import JSONField
from django.db import models
from django.utils import timezone


class BackgroundJob(models.Model):

class STATE(models.TextChoices):
QUEUED = "queued"
CONSUMED = "consumed"
Expand All @@ -15,8 +13,8 @@ class STATE(models.TextChoices):
queue_name = models.TextField(default="default")
state = models.CharField(max_length=16, default=STATE.QUEUED, choices=STATE.choices)
mtime = models.DateTimeField(default=timezone.now)
message = JSONField(blank=True, null=True)
result = JSONField(blank=True, null=True)
message = models.JSONField(blank=True, null=True)
result = models.JSONField(blank=True, null=True)
result_ttl = models.DateTimeField()

class Meta:
Expand Down

0 comments on commit ea73190

Please sign in to comment.