Commit aea98511 authored by Andreas Valder's avatar Andreas Valder
Browse files

one transaction per course

parent 2c308f06
......@@ -57,10 +57,10 @@ def schedule_thumbnail(lectureid):
@mod_required
@sched_func(600)
def sort_now():
modify('BEGIN')
courses = query('SELECT * FROM courses')
formats = query('SELECT * FROM formats ORDER BY prio')
for course in courses:
modify('BEGIN')
for mountpoint in config['VIDEOMOUNT']:
existingvideos = query('SELECT videos.path FROM videos JOIN lectures ON (videos.lecture_id = lectures.id) WHERE lectures.course_id = ?',course['id'])
knownerrors = query('SELECT sorterrorlog.path FROM sorterrorlog WHERE sorterrorlog.course_id = ?',course['id'])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment