Add print_phonehome management command

useful for:

* figuring out what phonehome will report
* getting some stats on-screen locally
This commit is contained in:
Klaas van Schelven
2025-01-29 10:06:41 +01:00
parent 452ac806b7
commit 01578d7829
3 changed files with 12 additions and 0 deletions

View File

View File

@@ -0,0 +1,12 @@
import json
from django.core.management.base import BaseCommand
from phonehome.tasks import _make_message_body
class Command(BaseCommand):
help = "Print the phonehome message to the console."
def handle(self, *args, **options):
message_body = _make_message_body()
print(json.dumps(message_body, indent=4))