black formating and new method names

This commit is contained in:
Martin
2026-01-29 16:52:59 +01:00
parent e67559e136
commit efc81d4c9c
8 changed files with 180 additions and 207 deletions
@@ -4,12 +4,13 @@
from __future__ import unicode_literals
import json
from time import time
from django.core.management.base import BaseCommand
from pyscada.ems.models import MeteringPoint, VirtualMeteringPoint
from pyscada.models import BackgroundProcess
from time import time
class Command(BaseCommand):
help = "Run Maintenance Jobs for PyScada-EMS"
@@ -19,7 +20,10 @@ class Command(BaseCommand):
"type", choices=["mp", "vmp", "all"], type=str, default="all"
)
parser.add_argument(
"id", type=int, default=-1, nargs="?",
"id",
type=int,
default=-1,
nargs="?",
)
def handle(self, *args, **options):
@@ -46,9 +50,6 @@ class Command(BaseCommand):
print(f"{(time()-tic):1.2f}")
return
if options["type"] in ["mp", "all"] and options["id"] == -1:
nb_mp = MeteringPoint.objects.count()
mp_i = 1