#7199 filter projects in create-allura-sitemap.py

v1.2.0
closed
nobody
42cc (432)
General
2015-08-20
2014-02-21
No

scripts/create-allura-sitemap.py should omit deleted projects and should have commandline option for neighborhood(s) to exclude. chunked_find can take a query param, so that should work. The query shouldn't need to be indexed (and a $nin is even fine) since chunked_find uses the _id index to go through all the records. (If you're up for it, investigate the first time chunked_find is called in which max_id is None and thus _id won't be in the query but is in the sort - will that perform poorly? need to have an initial max_id?)

Also, <lastmod> shouldn't just use the current date all the time, it should use the project mod date.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2014-02-21
    • Labels: --> 42cc
    • Status: open --> in-progress
     
  • Igor Bondarenko

    Igor Bondarenko - 2014-02-28

    Closed #547. je/42cc_7199

    You can exclude multiple neighborhoods like this:

    $ paster script ../Allura/development.ini ../scripts/create-allura-sitemap.py -- -n Users Adobe
    
     
  • Igor Bondarenko

    Igor Bondarenko - 2014-02-28
    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2014-03-03
    • status: code-review --> in-progress
    • QA: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2014-03-03

    What is the callback function for? It's not very clear to me, so it should have a better name and/or comments to explain itself.

    The help text for -n says "URL prefix of excluded neighborhood(s)" but it actually uses nbhd names for the query. That should be fixed up. I personally do prefer to use url prefixes, since those never change and you don't have to worry about escaping whitespace on the commandline (which may happen for a name with a space in it)

     
  • Igor Bondarenko

    Igor Bondarenko - 2014-03-14
    • status: in-progress --> code-review
     
  • Igor Bondarenko

    Igor Bondarenko - 2014-03-14

    Closed #555. Force-pushed je/42cc_7199

    We've switched from optparse to argparse, so there's no need in that odd callback function anymore (it was needed, 'cause oprparse can't handle multiple values for argument).

    Also, we've changed -n parameter to use url prefixes.

     
  • Dave Brondsema

    Dave Brondsema - 2014-03-27
    • status: code-review --> closed
    • Milestone: forge-backlog --> forge-apr-4
     
  • Dave Brondsema

    Dave Brondsema - 2015-01-05
    • Milestone: unreleased --> asf_release_1.2.0
     

Log in to post a comment.