mirror of
https://github.com/djohnlewis/stackdump
synced 2025-12-16 21:03:26 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db026d2ccc | ||
|
|
ae6e10e6c4 | ||
|
|
f79df598d3 |
@@ -165,16 +165,20 @@ bc.. [program:stackdump-solr]
|
|||||||
command=/path/to/stackdump/start_solr.sh
|
command=/path/to/stackdump/start_solr.sh
|
||||||
priority=900
|
priority=900
|
||||||
user=stackdump_user
|
user=stackdump_user
|
||||||
|
stopasgroup=true
|
||||||
stdout_logfile=/path/to/stackdump/solr_stdout.log
|
stdout_logfile=/path/to/stackdump/solr_stdout.log
|
||||||
stderr_logfile=/path/to/stackdump/solr_stderr.log
|
stderr_logfile=/path/to/stackdump/solr_stderr.log
|
||||||
|
|
||||||
[program:stackdump-web]
|
[program:stackdump-web]
|
||||||
command=/path/to/stackdump/start_web.sh
|
command=/path/to/stackdump/start_web.sh
|
||||||
user=stackdump_user
|
user=stackdump_user
|
||||||
|
stopasgroup=true
|
||||||
stdout_logfile=/path/to/stackdump/web_stdout.log
|
stdout_logfile=/path/to/stackdump/web_stdout.log
|
||||||
stderr_logfile=/path/to/stackdump/web_stderr.log
|
stderr_logfile=/path/to/stackdump/web_stderr.log
|
||||||
|
|
||||||
p. Yet another option for those using newer Linux distributions is to create native "systemd service definitions":http://www.freedesktop.org/software/systemd/man/systemd.service.html of type _simple_ for each of the components.
|
p. Supervisor v3.0b1 or later is required, due to the _stopasgroup_ parameter. Without this parameter, Supervisor will not be able to stop the Stackdump components properly as they're being executed from a script.
|
||||||
|
|
||||||
|
Yet another option for those using newer Linux distributions is to create native "systemd service definitions":http://www.freedesktop.org/software/systemd/man/systemd.service.html of type _simple_ for each of the components.
|
||||||
|
|
||||||
h2. Maintenance
|
h2. Maintenance
|
||||||
|
|
||||||
|
|||||||
@@ -538,13 +538,17 @@ class PostContentHandler(xml.sax.ContentHandler):
|
|||||||
|
|
||||||
By default, they are committed immediately. Set the ``commit`` argument
|
By default, they are committed immediately. Set the ``commit`` argument
|
||||||
to False to disable this behaviour.
|
to False to disable this behaviour.
|
||||||
|
|
||||||
|
This function will loop if a SolrError is encountered to allow the user
|
||||||
|
to retry the commit without having to start again from the beginning,
|
||||||
|
e.g. if the Solr instance stops responding.
|
||||||
"""
|
"""
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
self.solr.add(questions, commit=commit)
|
self.solr.add(questions, commit=commit)
|
||||||
break
|
break
|
||||||
except SolrError, e:
|
except SolrError, e:
|
||||||
print('An exception occurred while committing questions - ')
|
print('A Solr error occurred while committing questions - ')
|
||||||
traceback.print_exc(file=sys.stdout)
|
traceback.print_exc(file=sys.stdout)
|
||||||
print('')
|
print('')
|
||||||
while True:
|
while True:
|
||||||
@@ -557,6 +561,8 @@ class PostContentHandler(xml.sax.ContentHandler):
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
except:
|
||||||
|
raise
|
||||||
|
|
||||||
def commit_all_questions(self):
|
def commit_all_questions(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user