black formating and new method names
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user