Make 'rb-site upgrade' replace the example crontab.
Review Request #6096 — Created July 10, 2014 and submitted
Because we changed search backends from PyLucene to Haystack, users need to
change their crontabs to use the new indexing commands. This change makes it so
that we replace the example crontab in the site directory with the templated
version on upgrade.Some changes had to be made to template processing to avoid making assumptions
about some of the data, since upgrade doesn't ask any questions about domain
name, site root, etc. These aren't required for the cron template, so it all
works OK.
Created a 1.7.x site directory and saw that the sample crontab listed our old
PyLucene-based indexing commands. Ran 'rb-site upgrade' with this code and saw
it replaced with the new Haystack management commands.
Description | From | Last Updated |
---|---|---|
import 'choice' from line 17 shadowed by loop variable |
reviewbot | |
Blank line before this. |
chipx86 | |
Do we allow empty entries for the site root? I thought we required a value. If not, we should require … |
chipx86 | |
Maybe do this at a different time from the rebuild_index, so we don't swamp the database. (Do we need to … |
chipx86 |
- Commit:
-
70c146ac7d461ebaa87e825628196a8545ee275b946813a5d57609b1b3e1ae8242a01254bc59fb21
- Diff:
-
Revision 2 (+20 -8)
-
Tool: Pyflakes Processed Files: reviewboard/cmdline/rbsite.py Tool: PEP8 Style Checker Processed Files: reviewboard/cmdline/rbsite.py
-
Can we also fix the crontab to do two more things:
1) Run
rb-site manage /path/to/site cleanup
(for session cleanup) periodically (once a day?)
2) Use the-a
(age) argument forupdate_index
. (I think the minimum value is 1 hour, so-a 1
). Otherwise,update_index
looks at all review requests in the database.We'll probably want to rename the cron file for #1, but I think it's worth it.
-
-
Do we allow empty entries for the site root? I thought we required a value. If not, we should require one, since we default to '/'.
-
Tool: Pyflakes Processed Files: reviewboard/cmdline/rbsite.py Ignored Files: reviewboard/cmdline/conf/cron.conf.in Tool: PEP8 Style Checker Processed Files: reviewboard/cmdline/rbsite.py Ignored Files: reviewboard/cmdline/conf/cron.conf.in
-
Tool: Pyflakes Processed Files: reviewboard/cmdline/rbsite.py Ignored Files: reviewboard/cmdline/conf/cron.conf.in reviewboard/cmdline/conf/search-cron.conf.in Tool: PEP8 Style Checker Processed Files: reviewboard/cmdline/rbsite.py Ignored Files: reviewboard/cmdline/conf/cron.conf.in reviewboard/cmdline/conf/search-cron.conf.in