Skip to content

Commit

Permalink
add typechoices field in Job UPDATE_USER_BITMAP
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleguido committed Nov 30, 2024
1 parent 5fa8422 commit aed891c
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 5.0.8 on 2024-11-25 07:29

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('impresso', '0047_userrequest_notes'),
]

operations = [
migrations.AddField(
model_name='userrequest',
name='plan',
field=models.CharField(choices=[('plan-educational', 'Educational'), ('plan-researcher', 'Researcher'), ('plan-basic', 'Basic')], default='plan-basic', max_length=20),
),
migrations.AlterField(
model_name='job',
name='extra',
field=models.TextField(default='{}'),
),
migrations.AlterField(
model_name='job',
name='type',
field=models.CharField(choices=[('BCQ', 'Bulk collection from query'), ('BCT', 'Bulk collection from query TR passages'), ('DCO', 'Delete collection'), ('IDX', 'Index collection in search engine'), ('IDL', 'Index only collection for a few content items'), ('EXC', 'Export collection as CSV'), ('EXP', 'Export query as CSV'), ('TES', '10 minutes countdown, 1 percent every 6 seconds'), ('IMG', 'Generate vector signature for the image and store the result in the db'), ('ITR', 'Sync coll. to related TR passages'), ('RDX', 'Remove collection from solr index'), ('RTR', 'Remove coll. from SOLR TR index')], max_length=3),
),
]
17 changes: 17 additions & 0 deletions impresso/migrations/0049_remove_userrequest_plan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 5.0.8 on 2024-11-25 07:36

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('impresso', '0048_userrequest_plan_alter_job_extra_alter_job_type'),
]

operations = [
migrations.RemoveField(
model_name='userrequest',
name='plan',
),
]
18 changes: 18 additions & 0 deletions impresso/migrations/0050_alter_job_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.8 on 2024-11-30 09:19

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('impresso', '0049_remove_userrequest_plan'),
]

operations = [
migrations.AlterField(
model_name='job',
name='type',
field=models.CharField(choices=[('BCQ', 'Bulk collection from query'), ('BCT', 'Bulk collection from query TR passages'), ('DCO', 'Delete collection'), ('IDX', 'Index collection in search engine'), ('IDL', 'Index only collection for a few content items'), ('EXC', 'Export collection as CSV'), ('EXP', 'Export query as CSV'), ('TES', '10 minutes countdown, 1 percent every 6 seconds'), ('IMG', 'Generate vector signature for the image and store the result in the db'), ('ITR', 'Sync coll. to related TR passages'), ('RDX', 'Remove collection from solr index'), ('RTR', 'Remove coll. from SOLR TR index'), ('UUB', 'Update user bitmap')], max_length=3),
),
]
2 changes: 2 additions & 0 deletions impresso/models/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Job(models.Model):
CREATE_UPLOADED_IMAGE = "IMG"
REMOVE_FROM_SOLR = "RDX"
REMOVE_COLLECTIONS_FROM_SOLR_TR = "RTR"
UPDATE_USER_BITMAP = "UUB"

TYPE_CHOICES = (
(BULK_COLLECTION_FROM_QUERY, "Bulk collection from query"),
Expand All @@ -36,6 +37,7 @@ class Job(models.Model):
(SYNC_COLLECTIONS_TO_SOLR_TR, "Sync coll. to related TR passages"),
(REMOVE_FROM_SOLR, "Remove collection from solr index"),
(REMOVE_COLLECTIONS_FROM_SOLR_TR, "Remove coll. from SOLR TR index"),
(UPDATE_USER_BITMAP, "Update user bitmap"),
)

READY = "REA"
Expand Down

0 comments on commit aed891c

Please sign in to comment.