Contents:
database.
open_db
Opens the database
update_state
Update the state in db for the job job_id if it is less than new_state