Often large databases take several minutes to alter a table, this gives
zero feedback right now and makes it hard to guess where the problem
is if things eventually fail. Was the query slow? Was it making adequate
progress? after how much time it failed?
All of these questions will now be easier to answer. This PR spawns a
new thread everytime we migrate database and...
1. Every 10 seconds check if any command has been running for >10
seconds from current DB connection.
2. Print details about ongoing command like state, progress, time take
and query.
The progress detail is often misleading but it's better than nothing.
* perf: rebuild website search index in background
* refactor: allow enqueueing jobs during migrate
This was added a long time ago to handle missing redis during migrate.
It is not the case right now as redis HAS to be availabe during
migration.
ref: https://github.com/frappe/frappe/pull/2988
* ci: pass correct build type
* chore: warn about redis unavailability
Each site on a single app server can run on separate DBMS' on separate
servers. This site specific config resides in each site's
site_config.json file. Thereby, we need to load site's config before
checking for service's availability.
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
shows message before migrate if the database or redis service is not running
instead of trying to migrate and then failing.
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>