-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathidb_sessions.py
More file actions
31 lines (24 loc) · 843 Bytes
/
idb_sessions.py
File metadata and controls
31 lines (24 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from abc import ABC, abstractmethod
class ISessions(ABC):
@abstractmethod
def update_swipe_time(self, user):
""" Update time user was enqueued to current time """
raise NotImplementedError()
@abstractmethod
def reset_swipe_time(self, user):
""" Reset time user was enqueued """
raise NotImplementedError()
@abstractmethod
def get_swipe_time(self, user):
""" Return time user was enqueued """
raise NotImplementedError()
@abstractmethod
def get_on_site(self):
""" Return list of students who have swiped in <= 2 hours
who are not currently in the queue
"""
raise NotImplementedError()
@abstractmethod
def clear_on_site(self):
""" Reset everyone's last enqueue time """
raise NotImplementedError()