- The previous limit was 3 per user which is way too less, no known reason to
restrict this other than hogging of system with too many reports. Bumped
default limit to 20.
- site config is not easily discoverable or editable, added config in
system settings.
- Moved auto email report background job form daily queue to `daily_long` queue.
closes https://github.com/frappe/frappe/issues/16681
<img width="1049" alt="Screenshot 2022-04-20 at 12 33 06 PM" src="https://user-images.githubusercontent.com/9079960/164170117-5612d9df-da91-441b-a4f6-acd89d30336e.png">
`no-docs` (error message is sufficient to explain to user what to do without referring docs)
ref:
ISS-21-22-10245
ISS-21-22-07742
ISS-20-21-10850
ISS-20-21-10112
and many more times. This is such a stupid validation 🤦
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.
## Issue
`frappe.db.bulk_insert` is not working as expected:
- It will not insert any row if there are less than 3 values
- It will not add 1st row at all. e.g if I'm adding 5 values, it will only add 4.
- It will add values one by one after 2 values, instead it should have inserted items (in db) in chunk of 10000 (as per the code written before).
## Changes Made
- Solved above issues
- use better way to chunk list
- Added Postgres support for bulk_insert API
And now `bulk_insert` will only do **1 db call for each 10000** values.
Note: For testing purpose I made `Test Bulk Insert` doctype and keep chunk size of 100.
## Before

## After

nodocs