mirror of
https://github.com/djohnlewis/stackdump
synced 2025-12-16 12:53:28 +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
|
||||
priority=900
|
||||
user=stackdump_user
|
||||
stopasgroup=true
|
||||
stdout_logfile=/path/to/stackdump/solr_stdout.log
|
||||
stderr_logfile=/path/to/stackdump/solr_stderr.log
|
||||
|
||||
[program:stackdump-web]
|
||||
command=/path/to/stackdump/start_web.sh
|
||||
user=stackdump_user
|
||||
stopasgroup=true
|
||||
stdout_logfile=/path/to/stackdump/web_stdout.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
|
||||
|
||||
|
||||
@@ -538,13 +538,17 @@ class PostContentHandler(xml.sax.ContentHandler):
|
||||
|
||||
By default, they are committed immediately. Set the ``commit`` argument
|
||||
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:
|
||||
try:
|
||||
self.solr.add(questions, commit=commit)
|
||||
break
|
||||
except SolrError, e:
|
||||
print('An exception occurred while committing questions - ')
|
||||
print('A Solr error occurred while committing questions - ')
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
print('')
|
||||
while True:
|
||||
@@ -557,6 +561,8 @@ class PostContentHandler(xml.sax.ContentHandler):
|
||||
break
|
||||
else:
|
||||
raise
|
||||
except:
|
||||
raise
|
||||
|
||||
def commit_all_questions(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user