Autosave: 20260129-150543
This commit is contained in:
parent
212e4e71cc
commit
c1eea39519
BIN
assets/pasted-20260129-143332-d634d894.png
Normal file
BIN
assets/pasted-20260129-143332-d634d894.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
@ -21,11 +21,11 @@ class Command(BaseCommand):
|
||||
db_conn.cursor()
|
||||
self.stdout.write(self.style.SUCCESS('Database available!'))
|
||||
return
|
||||
except OperationalError:
|
||||
self.stdout.write('Database unavailable, waiting 1 second...')
|
||||
except OperationalError as e:
|
||||
self.stdout.write(f'Database unavailable ({e}), waiting 1 second...')
|
||||
time.sleep(1)
|
||||
except Exception as e:
|
||||
self.stdout.write(self.style.WARNING(f'Database error: {e}, waiting 1 second...'))
|
||||
time.sleep(1)
|
||||
|
||||
self.stdout.write(self.style.ERROR('Database unavailable after 30 seconds.'))
|
||||
self.stdout.write(self.style.ERROR('Database unavailable after 30 seconds.'))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user