1 2 3 4 5 6 7 8 9 10 11
from django.core.management.base import BaseCommand import rrd.mqtt class Command(BaseCommand): help = "Listen to mqtt events and update rrd files and graphs" def handle(self, *args, **kw): mqtt_client = rrd.mqtt.MQTTClient() mqtt_client.loop_forever()