Can now add tickets to the database
Fixed hearbeat function