Remove 'store_events' command

this command to store all events on the local filesystem was useful
while 'scaffolding'; getting my hands on some initial event-data in
the early days of Bugsink, but it was never meant as a permanent tool
This commit is contained in:
Klaas van Schelven
2025-02-27 15:14:05 +01:00
parent 4b7ed8f4ec
commit e10c1bf7ca
2 changed files with 1 additions and 25 deletions
@@ -1,24 +0,0 @@
import os
from django.core.management.base import BaseCommand
from events.models import Event
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('path', type=str)
parser.add_argument('--project_id', type=int)
def handle(self, *args, **options):
path = options['path']
project_id = options['project_id']
events = Event.objects.all()
if project_id:
events = events.filter(project_id=project_id)
for event in events:
with open(os.path.join(path, f'{event.event_id}.json'), 'w') as f:
f.write(event.get_raw_data())
+1 -1
View File
File diff suppressed because one or more lines are too long