mirror of
https://github.com/bugsink/bugsink.git
synced 2026-02-05 13:28:43 -06:00
Add print_phonehome management command
useful for: * figuring out what phonehome will report * getting some stats on-screen locally
This commit is contained in:
0
phonehome/management/__init__.py
Normal file
0
phonehome/management/__init__.py
Normal file
0
phonehome/management/commands/__init__.py
Normal file
0
phonehome/management/commands/__init__.py
Normal file
12
phonehome/management/commands/print_phonehome.py
Normal file
12
phonehome/management/commands/print_phonehome.py
Normal 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))
|
||||
Reference in New Issue
Block a user