Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import datetime/traceback missing in database.py #867

Open
chandanahs opened this issue Jan 3, 2019 · 0 comments
Open

import datetime/traceback missing in database.py #867

chandanahs opened this issue Jan 3, 2019 · 0 comments

Comments

@chandanahs
Copy link

run function of class DatabaseServer, uses traceback & datetime but not imported in the beginning.

the exception block hits only if database server starting fails, and if this is not fixed the re-try of starting database server will not be executed.

Adding below helps:

import traceback
import datetime

run function:(datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')))

try:
        self.server.serve_forever()
      except:
        traceback.print_exc()
        logging.error('HTTPServer %s at %s died on %s, restarting...',
                      self.name, self.address,
                      datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'))
    logging.info('Shutting down Database Server:%s at %s', self.name,
self.address)

Regards,
Chandana

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant