misc: add attribute to disable an installed service (#89302)
gitea/scrutiny/pipeline/head This commit looks good
Details
gitea/scrutiny/pipeline/head This commit looks good
Details
This commit is contained in:
parent
39fa8e2970
commit
44b189f28e
|
@ -73,4 +73,4 @@ class Command(BaseCommand):
|
|||
installed_version.save()
|
||||
|
||||
with multiprocessing.pool.ThreadPool() as pool:
|
||||
list(pool.imap_unordered(scrutinise, InstalledService.objects.all()))
|
||||
list(pool.imap_unordered(scrutinise, InstalledService.objects.filter(disabled=False)))
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 3.2.16 on 2024-04-09 10:27
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('projects', '0007_issue_info'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='installedservice',
|
||||
name='disabled',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
|
@ -86,6 +86,7 @@ class InstalledService(models.Model):
|
|||
platform = models.ForeignKey('Platform', on_delete=models.CASCADE)
|
||||
service = models.ForeignKey('Service', on_delete=models.CASCADE)
|
||||
url = models.URLField()
|
||||
disabled = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return '%s / %s / %s (@ %s)' % (
|
||||
|
|
Loading…
Reference in New Issue