Skip to content

Commit 7d2a9a4

Browse files
committed
[IMP] queue_job: use __slots__ for ChannelJob
It decreases memory footprint when there's thousands of jobs to prioritize.
1 parent ceb7edf commit 7d2a9a4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

queue_job/jobrunner/channels.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ class ChannelJob:
173173
174174
"""
175175

176+
__slots__ = ("db_name", "channel", "uuid", "seq", "date_created", "priority", "eta")
177+
176178
def __init__(self, db_name, channel, uuid, seq, date_created, priority, eta):
177179
self.db_name = db_name
178180
self.channel = channel

0 commit comments

Comments
 (0)