From 1cddadfe3426a5845008e38f430b4bd371986b51 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 20 Mar 2024 00:48:16 +0100
Subject: [PATCH] Rename DB path environment variable to something more unique.

---
 run.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/run.py b/run.py
index ef6aeab..3334637 100755
--- a/run.py
+++ b/run.py
@@ -6,7 +6,7 @@ from plomtask.misc import HandledException
 from plomtask.http import TaskHandler, TaskServer
 from plomtask.db import DatabaseFile
 
-PATH_DB = environ.get('PATH_DB')
+PLOMTASK_DB_PATH = environ.get('PLOMTASK_DB_PATH')
 HTTP_PORT = 8082
 TEMPLATES_DIR = 'templates'
 DB_CREATION_ASK = 'Database file not found. Create? Y/n\n'
@@ -14,9 +14,9 @@ DB_CREATION_ASK = 'Database file not found. Create? Y/n\n'
 
 if __name__ == '__main__':
     try:
-        if not PATH_DB:
-            raise HandledException('PATH_DB not set.')
-        db_file = DatabaseFile(PATH_DB)
+        if not PLOMTASK_DB_PATH:
+            raise HandledException('PLOMTASK_DB_PATH not set.')
+        db_file = DatabaseFile(PLOMTASK_DB_PATH)
         if not db_file.exists:
             legal_yesses = {'y', 'yes', 'yes.', 'yes!'}
             reply = input(DB_CREATION_ASK)
-- 
2.30.2