only delete from db when the task was previously marked as dirty before run