Script to check database connection health.
Not used anymore, since it required a lot of CPU overhead and would prevent the machine from idling with low
CPU usage.
Can still be run once during deployment, or by hand.
Classes
Command
Check service health: migrations, dependencies
Methods
handle(self, **options)
The actual logic of the command. Subclasses must implement
this method.
Source code in snoop/data/management/commands/healthcheck.py
def handle(self, **options):
assert is_database_synchronized(), 'Migrations not run'
print('database ok')