clear database after closing app, update notification and database on main thread for now