The value changed is being checked directly
Checking the flag breaks if this or a similar test is run multiple times on the same database
Also extract 255 into a separate variable
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* style: add spaces to hooks boilerplate
Black wants comments to start with a space. Adding them here means less formatting later.
* style: init_template
Put version on the first line and use double quotes.
posthog is not required to be present everwhere and is more of a
solution for onboarding problems. Sentry on other hand should be
available everywhere.
* refactor(data_import): handle RQ timeouts better
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* refactor(data_import): display count of documents even for timed out jobs
Also handle "0" cases better - should be plural there
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
---------
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
When roles are added in fixture `desk_access` always appears to be
"changed" because of how fixtures work.
This causes all users with the said role to be re-evaluated. This is
unnecessary computation because desk_access rarely changes in most apps.
Fix: See if role's desk access is same as user's desk access and don't
re-evalute them.
E.g. If role fixture without desk access is being migrated then it will
skip all users who are already website users. Likewise role with desk
access will skip all users who are already system users.
* feat: `describe-database-table` to get stats about a table
This provides description of table, indexes, total row count in machine
parseable format.
Towards https://github.com/frappe/press/issues/1265
* Update test_commands.py
People ususally write queries like these...
```
frappe.get_all(doctype, {"name": ("in", list_of_docs))
```
Ocassionally, the `list_of_docs` is empty because it's dynamically
generated and in this case we end up doing full table scan to find... nothing!
env/lib/python3.11/site-packages/rq/job.py:796: DeprecationWarning: job.exc_info is deprecated, use job.latest_result() instead.
warnings.warn("job.exc_info is deprecated, use job.latest_result() instead.", DeprecationWarning)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>