netgen / ibexa-scheduled-visibility

Content visibility scheduling for Ibexa CMS
https://netgen.io
GNU General Public License v2.0
0 stars 0 forks source link

php bin/console ngscheduledvisibility:update for big installations new option --process_last_items_limit #4

Open fwoldt opened 1 week ago

fwoldt commented 1 week ago

For big installation it could be a problem to process everytime all articles in the script php bin/console ngscheduledvisibility:update

a good option could be to sort the objects by modified date and only process the last xxx items --process_last_items_limit ...

pspanja commented 1 week ago

Indeed we can implement that, how would you prefer to define the last items? Perhaps in days would be OK, for example --since=30 to process all items modified in last 30 days?

Just note that would not be bulletproof, as it would for example skip something that was updated more than 30 days ago to be visible after more than 30 days. But it would definitely be useful with some constraints.

BTW, once the items are in persistent cache (so basically on a repeated run), on my machine ~50k items are processed in ~30 seconds, which I think is not slow at all.

fwoldt commented 1 week ago

oh that's pretty fast .... days should be a good value ... the option would be good for testing, too ;-) modified --since=1 (day) to disable check of old items which may make problems

pspanja commented 1 week ago

Now implemented and released as 1.0.0-rc2.