open-contracting/cove-ocds

Disable flattening / Make it on-demand

Closed this issue · 2 comments

Like cove-oc4ids, flattening uses an inordinate amount of RAM. Since it's infrequently used (though more than on cove-oc4ids) we can either disable it like in cove-oc4ids, or we can only calculate it when someone (infrequently) clicks the link to download the Excel file.

zgrep /flattened /var/log/apache2/other_vhosts_access.log*.gz | grep -v 'python-requests/2.24.0' | cut -d' ' -f 5-12 | sort

Shows 32 non-test requests within the last 14 days. So, this should be on-demand, rather than disabled.

cove-ocds already does it on demand (flatten=request.POST.get("flatten") argument to convert_json), whereas cove-oc4ids did it always (flatten=True). So, this issue has no action.