mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-07 09:38:11 +08:00
add attempt_count to config docs, set value to 1 in inital task save
This commit is contained in:
@@ -497,6 +497,7 @@ def save_task(task, broker: Broker):
|
||||
result=task["result"],
|
||||
group=task.get("group"),
|
||||
success=task["success"],
|
||||
attempt_count=1
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.7 on 2020-08-11 15:17
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_q', '0012_auto_20200702_1608'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='task',
|
||||
name='attempt_count',
|
||||
field=models.IntegerField(default=0),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user