-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskQueue.py
61 lines (46 loc) · 1.19 KB
/
TaskQueue.py
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from queue import Queue
class TaskQueue(object):
"""
数据队列
"""
videoQueue = Queue()
authorQueue = Queue()
tagQueue = Queue()
def __init__(self):
pass
@classmethod
def getVideoQueue(cls):
return cls.videoQueue
@classmethod
def getAuthorQueue(cls):
return cls.authorQueue
@classmethod
def getTagQueue(cls):
return cls.tagQueue
@classmethod
def isVideoQueueEmpty(cls):
return cls.videoQueue.empty()
@classmethod
def isAuthorQueueEmpty(cls):
return cls.authorQueue.empty()
@classmethod
def isTagQueueEmpty(cls):
return cls.tagQueue.empty()
@classmethod
def putToVideoQueue(cls, item):
return cls.videoQueue.put(item)
@classmethod
def putToAuthorQueue(cls, item):
return cls.authorQueue.put(item)
@classmethod
def putToTagQueue(cls, item):
return cls.tagQueue.put(item)
@classmethod
def getFromVideoQueue(cls):
return cls.videoQueue.get()
@classmethod
def getFromAuthorQueue(cls):
return cls.authorQueue.get()
@classmethod
def getFromTagQueue(cls):
return cls.tagQueue.get()