From 74b8dbba68d06976e837c70c797d29643c57fe4d Mon Sep 17 00:00:00 2001 From: Jacob Daniel Bennett Date: Thu, 27 Aug 2020 14:08:44 -0400 Subject: [PATCH 1/4] Enhancement-Universal-File-Location --- api/ECNQueue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/ECNQueue.py b/api/ECNQueue.py index 0c431a3..6402bb4 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -14,7 +14,7 @@ #------------------------------------------------------------------------------# # The directory where queue items are -queueDirectory = "/Users/justincampbell/GitHub/ecn-queue/webqueue/q-snapshot" +queueDirectory = os.path.join(os.path.dirname(os.getcwd()), "q-snapshot") # Queues to not load in getQueues() queuesToIgnore = ["archives", "drafts", "inbox"] From cd47c3bf5ad9f88afed01d045b5e0768480398f0 Mon Sep 17 00:00:00 2001 From: Jacob Daniel Bennett Date: Thu, 27 Aug 2020 15:01:36 -0400 Subject: [PATCH 2/4] Fix relative filepath issue from previous push --- api/ECNQueue.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/ECNQueue.py b/api/ECNQueue.py index 6402bb4..4347464 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -14,7 +14,8 @@ #------------------------------------------------------------------------------# # The directory where queue items are -queueDirectory = os.path.join(os.path.dirname(os.getcwd()), "q-snapshot") +queueDirectory = os.path.join(os.path.dirname(os.path.dirname(__file__)), "q-snapshot") +#print(os.path.join(os.path.dirname(os.path.dirname(__file__)), "q-snapshot")) # Queues to not load in getQueues() queuesToIgnore = ["archives", "drafts", "inbox"] From db8e5f9005cf24a46469a100e0b375ac36774f1e Mon Sep 17 00:00:00 2001 From: Jacob Daniel Bennett Date: Fri, 28 Aug 2020 10:24:52 -0400 Subject: [PATCH 3/4] Readability Improvement from previous push --- api/ECNQueue.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/ECNQueue.py b/api/ECNQueue.py index 4347464..b73fd77 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -14,8 +14,10 @@ #------------------------------------------------------------------------------# # The directory where queue items are -queueDirectory = os.path.join(os.path.dirname(os.path.dirname(__file__)), "q-snapshot") -#print(os.path.join(os.path.dirname(os.path.dirname(__file__)), "q-snapshot")) +CurrentFilePath = __file__ +CurrentFileDirectory = os.path.dirname(CurrentFilePath) +CurrentFileDirectoryParent = os.path.dirname(CurrentFileDirectory) +queueDirectory = os.path.join(CurrentFileDirectoryParent, "q-snapshot") # Queues to not load in getQueues() queuesToIgnore = ["archives", "drafts", "inbox"] @@ -343,4 +345,4 @@ def getQueues() -> list: if isDirectory and isValid: queues.append(Queue(file)) - return queues + return queues \ No newline at end of file From f93dd994186a332963ed2b440b6a6ff4960398a8 Mon Sep 17 00:00:00 2001 From: Jacob Daniel Bennett Date: Fri, 28 Aug 2020 10:31:39 -0400 Subject: [PATCH 4/4] Naming Convention Edits --- api/ECNQueue.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/ECNQueue.py b/api/ECNQueue.py index b73fd77..caba91f 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -14,10 +14,10 @@ #------------------------------------------------------------------------------# # The directory where queue items are -CurrentFilePath = __file__ -CurrentFileDirectory = os.path.dirname(CurrentFilePath) -CurrentFileDirectoryParent = os.path.dirname(CurrentFileDirectory) -queueDirectory = os.path.join(CurrentFileDirectoryParent, "q-snapshot") +currentFilePath = __file__ +currentFileDirectory = os.path.dirname(currentFilePath) +currentFileDirectoryParent = os.path.dirname(currentFileDirectory) +queueDirectory = os.path.join(currentFileDirectoryParent, "q-snapshot") # Queues to not load in getQueues() queuesToIgnore = ["archives", "drafts", "inbox"]