Skip to content

Commit

Permalink
Remove __getAssignedTo from Item b/c it is no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Oct 29, 2020
1 parent 202e04c commit 0b8776b
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions api/ECNQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(self, queue: str, number: int) -> None:
self.userEmail = self.__parseFromData(data="userEmail")
self.userName = self.__parseFromData(data="userName")
self.userAlias = self.__getUserAlias()
self.assignedTo = self.__getAssignedTo()
self.assignedTo = self.__getMostRecentHeaderByType("Assigned-To")
self.subject = self.__getMostRecentHeaderByType("Subject")
self.status = self.__getMostRecentHeaderByType("Status")
self.priority = self.__getMostRecentHeaderByType("Priority")
Expand Down Expand Up @@ -1033,7 +1033,6 @@ def __getSortedSections(self, sectionsList: list) -> list:

return sortedSections


def __isLocked(self) -> Union[str, bool]:
"""Returns a string info about the lock if true and a bool False if false
Expand Down Expand Up @@ -1114,16 +1113,6 @@ def __getUserAlias(self) -> str:
"""
emailUser, emailDomain = self.userEmail.split("@")
return emailUser if emailDomain.endswith("purdue.edu") else ""

def __getAssignedTo(self) -> str:
"""Returns the alias of the person this item was most recently assigned to.
Returns empty string if this item isn't assigned.
Returns:
str: Alias of the person item is assigned to or empty string.
"""
assignedTo = self.__getMostRecentHeaderByType("Assigned-To")
return assignedTo

def __getFormattedDate(self, date: str) -> str:
"""Returns the date/time formatted as RFC 8601 YYYY-MM-DDTHH:MM:SS+00:00.
Expand Down Expand Up @@ -1233,10 +1222,4 @@ def getQueues() -> list:
if isDirectory and isValid:
queues.append(Queue(file))

return queues

if __name__ == "__main__":
start = time.time()
queues = getQueues()
end = time.time()
print(f'Fetching all queues took {end - start}s')
return queues

0 comments on commit 0b8776b

Please sign in to comment.