mirror of
https://github.com/bugsink/bugsink.git
synced 2025-12-20 12:29:57 -06:00
Create 'bsmain' (for bugsink-main) app to hold commands
As had been noted on some of the commands, 'ingest' was not the best place for them. However, [project-level apps are not supported in Django](https://forum.djangoproject.com/t/allow-project-to-have-management-commands/5220/2) So just create a 'main' app. I want to qualify it as 'myproject-main' though, to avoid further unqualified global namespace pollution. And I want to avoid prefixing with 'bugsink' b/c that's annoying for tab-completion. So 'bs' it is. I've moved all commands over; even though a case could be made that the "feeding" commands (raise_exception, send_json, stress_test) are somewhat related to ingestion, that's not a very good case :-)
This commit is contained in:
0
bsmain/__init__.py
Normal file
0
bsmain/__init__.py
Normal file
0
bsmain/admin.py
Normal file
0
bsmain/admin.py
Normal file
6
bsmain/apps.py
Normal file
6
bsmain/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class BsmainConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "bsmain"
|
||||
0
bsmain/management/__init__.py
Normal file
0
bsmain/management/__init__.py
Normal file
0
bsmain/management/commands/__init__.py
Normal file
0
bsmain/management/commands/__init__.py
Normal file
@@ -4,7 +4,6 @@ from snappea.models import Task
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
# "ingest" may not be the best place for this, but "bugsink" is not an app, so Django won't discover it.
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument(
|
||||
0
bsmain/migrations/__init__.py
Normal file
0
bsmain/migrations/__init__.py
Normal file
0
bsmain/models.py
Normal file
0
bsmain/models.py
Normal file
0
bsmain/tests.py
Normal file
0
bsmain/tests.py
Normal file
0
bsmain/views.py
Normal file
0
bsmain/views.py
Normal file
@@ -65,6 +65,7 @@ INSTALLED_APPS = [
|
||||
]
|
||||
|
||||
BUGSINK_APPS = [
|
||||
'bsmain',
|
||||
'phonehome',
|
||||
'users',
|
||||
'theme',
|
||||
|
||||
@@ -23,7 +23,7 @@ from issues.models import IssueStateManager, Issue, TurningPoint, TurningPointKi
|
||||
from bugsink.app_settings import override_settings
|
||||
from compat.timestamp import format_timestamp
|
||||
from compat.dsn import get_header_value
|
||||
from ingest.management.commands.send_json import Command as SendJsonCommand
|
||||
from bsmain.management.commands.send_json import Command as SendJsonCommand
|
||||
|
||||
from .views import BaseIngestAPIView
|
||||
from .parsers import readuntil, NewlineFinder, ParseError, LengthFinder, StreamingEnvelopeParser
|
||||
|
||||
@@ -39,6 +39,7 @@ where = ["."]
|
||||
include = [
|
||||
"alerts*",
|
||||
"api*",
|
||||
"bsmain*",
|
||||
"bugsink*",
|
||||
"compat*",
|
||||
"events*",
|
||||
|
||||
Reference in New Issue
Block a user