Add ping reconnect mysql connection
See: https://github.com/coleifer/peewee/blob/master/playhouse/shortcuts.py#L174-L229 I use like this before, Why not use ping auto reconnect?
When mysql server restart or lost connection, connection not reconnect and database.is_closed is False.

Add ping(reconnect=True) auto reconnect.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 1987, in __len__
    self._ensure_execution()
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 1969, in _ensure_execution
    self.execute()
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 1886, in inner
    return method(self, database, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 1957, in execute
    return self._execute(database)
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 2129, in _execute
    cursor = database.execute(self)
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3112, in execute
    return self.execute_sql(sql, params, commit=commit)
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3106, in execute_sql
    self.commit()
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 2873, in __exit__
    reraise(new_type, new_type(exc_value, *exc_args), traceback)
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 183, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.8/dist-packages/peewee.py", line 3099, in execute_sql
    cursor.execute(sql, params or ())
  File "/usr/local/lib/python3.8/dist-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/usr/local/lib/python3.8/dist-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/usr/local/lib/python3.8/dist-packages/pymysql/connections.py", line 516, in query
    self._execute_command(COMMAND.COM_QUERY, sql)
  File "/usr/local/lib/python3.8/dist-packages/pymysql/connections.py", line 750, in _execute_command
    raise err.InterfaceError("(0, '')")
peewee.InterfaceError: (0, '')

>>> database.is_closed()
False
