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

Method read_schedule

huey/storage.py:911–924  ·  view source on GitHub ↗
(self, ts)

Source from the content-addressed store, hash-verified

909 'values (?, ?, ?)', params, commit=True)
910
911 def read_schedule(self, ts):
912 with self.db(commit=True) as curs:
913 params = (self.name, ts.timestamp())
914 curs.execute('select id, data from schedule where '
915 'queue = ? and timestamp <= ?', params)
916 id_list, data = [], []
917 for task_id, task_data in curs.fetchall():
918 id_list.append(task_id)
919 data.append(task_data)
920 if id_list:
921 plist = ','.join('?' * len(id_list))
922 curs.execute('delete from schedule where id IN (%s)' % plist,
923 id_list)
924 return data
925
926 def schedule_size(self):
927 return self.sql('select count(id) from schedule where queue=?',

Callers

nothing calls this directly

Calls 2

dbMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected