MCPcopy Index your code
hub / github.com/coleifer/huey / dequeue

Method dequeue

huey/storage.py:879–888  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

877 (self.name, self.to_blob(data), priority or 0), commit=True)
878
879 def dequeue(self):
880 with self.db(commit=True) as curs:
881 curs.execute('select id, data from task where queue = ? '
882 'order by priority desc, id limit 1', (self.name,))
883 result = curs.fetchone()
884 if result is not None:
885 tid, data = result
886 curs.execute('delete from task where id = ?', (tid,))
887 if curs.rowcount == 1:
888 return data
889
890 def queue_size(self):
891 return self.sql('select count(id) from task where queue=?',

Callers

nothing calls this directly

Calls 2

dbMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected