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,8 +21,8 @@ class Command(BaseCommand):
|
|||||||
db_conn.cursor()
|
db_conn.cursor()
|
||||||
self.stdout.write(self.style.SUCCESS('Database available!'))
|
self.stdout.write(self.style.SUCCESS('Database available!'))
|
||||||
return
|
return
|
||||||
except OperationalError:
|
except OperationalError as e:
|
||||||
self.stdout.write('Database unavailable, waiting 1 second...')
|
self.stdout.write(f'Database unavailable ({e}), waiting 1 second...')
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.stdout.write(self.style.WARNING(f'Database error: {e}, waiting 1 second...'))
|
self.stdout.write(self.style.WARNING(f'Database error: {e}, waiting 1 second...'))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user