def terminate(self):
    'Gracefully shutdown the service\n\n        This method will be executed when the Service has to shutdown cleanly.\n\n        If not implemented the process will just end with status 0.\n\n        To customize the exit code, the :py:class:`SystemExit` exception can be\n        used.\n\n        Any exceptions raised by this method will be logged and the worker will\n        exit with status 1.\n        '
Gracefully shutdown the service

This method will be executed when the Service has to shutdown cleanly.

If not implemented the process will just end with status 0.

To customize the exit code, the :py:class:`SystemExit` exception can be
used.

Any exceptions raised by this method will be logged and the worker will
exit with status 1.
def terminate(self):
    'Gracefully shutdown the service\n\n        This method will be executed when the Service has to shutdown cleanly.\n\n        If not implemented the process will just end with status 0.\n\n        To customize the exit code, the :py:class:`SystemExit` exception can be\n        used.\n\n        Any exceptions raised by this method will be logged and the worker will\n        exit with status 1.\n        '