Adding sentry logging

Checking the database connection before starting job just in case it needs to be reset