code: def close(self, response):
          
          LOGGER.info('Closing [%s]', os.getpid())
          if not self.database.is_closed():
              self.database.close()
          return response
docs: Close connection to database.