Spaces:
Sleeping
Sleeping
tyrwh
commited on
Commit
·
cdc1556
1
Parent(s):
1342ec2
Minor startup changes
Browse files
app.py
CHANGED
|
@@ -418,18 +418,10 @@ def print_startup_info():
|
|
| 418 |
else:
|
| 419 |
print(f"Directory {path_str} does not exist.")
|
| 420 |
|
| 421 |
-
nemaquant_script = APP_ROOT / 'nemaquant.py'
|
| 422 |
-
print(f"NemaQuant script exists: {nemaquant_script.exists()}")
|
| 423 |
-
if nemaquant_script.exists():
|
| 424 |
-
try:
|
| 425 |
-
permissions = oct(nemaquant_script.stat().st_mode)[-3:]
|
| 426 |
-
print(f"NemaQuant script permissions: {permissions}")
|
| 427 |
-
except Exception as e:
|
| 428 |
-
print(f"Could not get NemaQuant script details: {e}")
|
| 429 |
|
| 430 |
@app.before_request
|
| 431 |
def startup_routine():
|
| 432 |
-
# Ensure session id
|
| 433 |
if 'id' not in session:
|
| 434 |
session['id'] = str(uuid.uuid4())
|
| 435 |
print('Running periodic cleanup of old sessions...')
|
|
|
|
| 418 |
else:
|
| 419 |
print(f"Directory {path_str} does not exist.")
|
| 420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
|
| 422 |
@app.before_request
|
| 423 |
def startup_routine():
|
| 424 |
+
# Ensure session id exists
|
| 425 |
if 'id' not in session:
|
| 426 |
session['id'] = str(uuid.uuid4())
|
| 427 |
print('Running periodic cleanup of old sessions...')
|