Skip to content

Commit

Permalink
feat: LEAP-1601: Add custom_task_lock_ttl field (#6572)
Browse files Browse the repository at this point in the history
Co-authored-by: triklozoid <triklozoid@users.noreply.github.com>
  • Loading branch information
triklozoid and triklozoid authored Oct 30, 2024
1 parent ce6ee3a commit a7c38ed
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.16 on 2024-10-29 15:11

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('projects', '0026_auto_20231103_0020'),
]

operations = [
migrations.AddField(
model_name='project',
name='custom_task_lock_ttl',
field=models.IntegerField(default=None, help_text='Custom task lock TTL in seconds. If not set, the default value is used', null=True, verbose_name='custom_task_lock_ttl'),
),
]
7 changes: 7 additions & 0 deletions label_studio/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,13 @@ class SkipQueue(models.TextChoices):

pinned_at = models.DateTimeField(_('pinned at'), null=True, default=None, help_text='Pinned date and time')

custom_task_lock_ttl = models.IntegerField(
_('custom_task_lock_ttl'),
null=True,
default=None,
help_text='Custom task lock TTL in seconds. If not set, the default value is used',
)

def __init__(self, *args, **kwargs):
super(Project, self).__init__(*args, **kwargs)
self.__original_label_config = self.label_config
Expand Down

0 comments on commit a7c38ed

Please sign in to comment.