update sleep thread, add properties and update database