Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialization and users app #267

Merged
merged 221 commits into from
Feb 2, 2024
Merged

Initialization and users app #267

merged 221 commits into from
Feb 2, 2024

Conversation

dboulware
Copy link
Contributor

This PR:

  • Introduces an initialization app that ensures the sensor capabilities, calibrations, switches, preselector, sensor, and signal analyzer are initialized in the correct order and available to the other Django applications through singleton classes.
  • Replaces the create_superuser script with a users app that initializes the users. This is to eliminate unnecessarily creating the django app multiple times.
  • Removes the migration_setting and runtime_settings and instead uses a single settings file, but checks within the code if migrations are being run to avoid connecting to the signal analyzer while migrations are being run.
  • Adds an optional USB_DEVICE and adds usbutils to the api container to allow the scos-sensor to check for a required usb device. If the device is not found it will restart the container.
  • Checks the signal analyzer if it is healthy on startup and restart the container if the signal analyzer is not healty.
  • Adds /dev/bus/usb as a volume in the container. This was done in hopes that it would allow the container to see the signal analyzer even when the container started before the USB was ready. It doesn't appear to do that, but it looks like it changes the usb error to a recoverable error.

@dboulware dboulware marked this pull request as ready for review January 30, 2024 14:38
Copy link
Member

@aromanielloNTIA aromanielloNTIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works well based on testing on seadog01. See a few comments about defaults inline below.

src/initialization/capabilities_loader.py Outdated Show resolved Hide resolved
src/sensor/settings.py Outdated Show resolved Hide resolved
aromanielloNTIA and others added 3 commits January 30, 2024 19:40
…EL. Add check and raise exception if SIGAN_MODULE or SIGAN_CLASS are not set. Don't set sensor_sha512 if unable to generate hash. Add DEVICE_MODEL to readme and env.template.
@dboulware dboulware merged commit 7301d7d into master Feb 2, 2024
4 checks passed
@dboulware dboulware deleted the ActionRefactorActionsApp branch February 29, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants