diff --git a/.gitignore b/.gitignore index e238c91..184e9b6 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ yarn-error.log* /api/venv __pycache__/ venv-manager.log -/api/.env \ No newline at end of file +/api/.env +/api/webqueueapi.egg-info \ No newline at end of file diff --git a/api/ECNQueue.py b/api/ECNQueue.py index 2cfcf98..88173c8 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -1331,7 +1331,11 @@ def getQueueCounts() -> list: possibleItems = os.listdir(queueDirectory + "/" + queue) validItems = [isValidItemName for file in possibleItems] queueInfo.append( {"name": queue, "number_of_items": len(validItems)} ) - return queueInfo + + # Sorts list of queue info alphabetically + sortedQueueInfo = sorted(queueInfo, key = lambda queueInfoList: queueInfoList['name']) + + return sortedQueueInfo def loadQueues() -> list: @@ -1345,4 +1349,4 @@ def loadQueues() -> list: for queue in getValidQueues(): queues.append(Queue(queue)) - return queues + return queues \ No newline at end of file diff --git a/utils/venv-manager.py b/utils/venv-manager.py index 72ecd3b..3bb15ce 100644 --- a/utils/venv-manager.py +++ b/utils/venv-manager.py @@ -79,7 +79,7 @@ def get_args() -> argparse.Namespace: return parser.parse_args() -def run_logged_subprocess(command: Union[str, list], timeout: int = 10, shell: bool = True) -> tuple: +def run_logged_subprocess(command: Union[str, list], timeout: int = 60, shell: bool = True) -> tuple: """Executes a shell command using subprocess with logging. stderr is redirected to stdout and stdout is pipped to logger. @@ -96,7 +96,7 @@ def run_logged_subprocess(command: Union[str, list], timeout: int = 10, shell: b Args: command (Union): The command to run. If shell=False, pass a list with the first item being the command and the subsequent items being arguments. If shell=True, pass a string as you would type it into a shell. - timeout (int): The number of seconds to wait for a program before killing it + timeout (int): The number of seconds to wait for a program before killing it. Defaults to 60. Returns: tuple: With the first value being the return code and second being the combined stdout+stderr