Skip to content

Commit da5e41d

Browse files
Support for both single and high/low tariff #130
1 parent 35ef8c0 commit da5e41d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

dsmr_stats/management/commands/dsmr_fake_stats.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@
66
from django.conf import settings
77
from django.db import models
88

9-
from dsmr_backend.mixins import InfiniteManagementCommandMixin
109
from dsmr_stats.models.statistics import DayStatistics, HourStatistics
1110
from dsmr_consumption.models.consumption import ElectricityConsumption
1211
from dsmr_datalogger.models.reading import DsmrReading
1312

1413

15-
class Command(InfiniteManagementCommandMixin, BaseCommand):
14+
class Command(BaseCommand):
1615
help = _('Alters any stats generate to fake data. DO NOT USE in production! Used for integration checks.')
17-
name = __name__ # Required for PID file.
18-
sleep_time = 10
1916

2017
def add_arguments(self, parser):
2118
super(Command, self).add_arguments(parser)
@@ -27,7 +24,7 @@ def add_arguments(self, parser):
2724
help=_('Required option to acknowledge you that you WILL mess up your data with this.')
2825
)
2926

30-
def run(self, **options):
27+
def handle(self, **options):
3128
""" InfiniteManagementCommandMixin listens to handle() and calls run() in a loop. """
3229
if not settings.DEBUG:
3330
raise CommandError(_('Intended usage is NOT production! Only allowed when DEBUG = True'))

0 commit comments

Comments
 (0)