Page MenuHomePhabricator
Paste P5141

Expired task clearing command
ActivePublic

Authored by Halfak on Mar 27 2017, 7:24 PM.
DELETE FROM workset_task
USING workset_task AS wt
JOIN workset AS w ON
w.id = wt.workset_id
LEFT JOIN label AS l ON
l.task_id = wt.task_id AND
l.user_id = w.user_id
WHERE
workset_task.task_id = wt.task_id AND
workset_task.workset_id = wt.workset_id AND
l.data is NULL AND
w.expires < NOW()