GeoNode/geonode — pull request #69 by ingenieroariel (2011-10-12 19:45:24+00:00)
Title: Better updatelayers (Fix for 977)

Hello team, as part of the debugging for using updatelayers in a GeoServer instance with 800 layers and only 2GB of RAM. I created an updated version of the updatelayers management command and the slurp method.

Here is how the output looks now:

(venv)$ geonode updatelayers --ignore-errors
Inspecting the available layers in GeoServer ...
Found 883 layers, starting processing
[updated] Layer WaterBasinData_2050_2059_b1GC7I6 (0/883)
[updated] Layer WaterBasinData_2050_2059_b1GC19I5 (1/883)
[updated] Layer WaterBasinData_2050_2059_b1GC16I4 (2/883)
[updated] Layer WaterBasinData_2050_2059_b1GC12I3 (3/883)
[updated] Layer WaterBasinData_2050_2059_b1GC4I2 (4/883)
[updated] Layer WaterBasinData_2050_2059_b1GC7I3 (5/883)
[updated] Layer WaterBasinData_2050_2059_b1GC13I3 (6/883)
[updated] Layer WaterBasinData_2050_2059_b1GC20I2 (7/883)
[updated] Layer WaterBasinData_2050_2059_b1GC18I1 (8/883)
[updated] Layer WaterBasinData_2050_2059_b1GC6I5 (9/883)
[updated] Layer WaterBasinData_2050_2059_b1GC10I6 (10/883)
[updated] Layer WaterBasinData_2050_2059_b1GC5I4 (11/883)
[updated] Layer WaterBasinData_2050_2059_b1GC22I3 (12/883)
[updated] Layer WaterBasinData_2050_2059_b1GC4I4 (13/883)
[updated] Layer WaterBasinData_2050_2059_b1GC2I6 (14/883)
[updated] Layer WaterBasinData_2050_2059_b1GC21I4 (15/883)
[updated] Layer WaterBasinData_2050_2059_b1GC13I4 (16/883)
[updated] Layer WaterBasinData_2050_2059_b1GC3I4 (17/883)
[failed] Layer WaterBasinData_2050_2059_b1GC5I6 (18/883)
[failed] Layer WaterBasinData_2050_2059_b1GC19I1 (19/883)

Please note that I have not tested this outside my local installation, it needs to be tried in other instances before considering it done.

This fix should be in scope for 1.1 given it is a bug fix for a ticked listed for "Rock Solid" but should ideally have an integration test to show it actually works. Suggestions welcome for the best way of writing a test for updatelayers.