Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#7145 When deleting a tool, the solr call should be a bg task

forge-backlog
open
nobody
bitesize (47)
nobody
General
None
2014-06-30
2014-02-06
Dave Brondsema
No

We should run a background task instead of calling it inline, so that there's not an error when solr's down. And makes the operation faster for the user anyway.

See also [#4799] which is somewhat of a reverse problem

File '/var/local/allura/Allura/allura/app.py', line 474 in uninstall
  project_id, self.config.options['mount_point']))
File '/var/local/allura/Allura/allura/lib/solr.py', line 76 in delete
  responses.append(solr.delete(*args, **kw))
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
  return self.run_and_log(func, inst, *args, **kwargs)
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 126 in run_and_log
  return func(*args, **kwargs)
File '/var/local/env-allura/lib/python2.7/site-packages/pysolr-2.1.0_beta-py2.7.egg/pysolr.py', line 716 in delete
  response = self._update(m, commit=commit, waitFlush=waitFlush, waitSearcher=waitSearcher)
File '/var/local/env-allura/lib/python2.7/site-packages/pysolr-2.1.0_beta-py2.7.egg/pysolr.py', line 401 in _update
  return self._send_request('POST', path, message, {'Content-type': 'text/xml; charset=utf-8'})
File '/var/local/env-allura/lib/python2.7/site-packages/pysolr-2.1.0_beta-py2.7.egg/pysolr.py', line 310 in _send_request
  headers, response = http.request(url, method=method, body=body, headers=headers)
File '/var/local/env-allura/lib/python2.7/site-packages/httplib2-0.7.4-py2.7.egg/httplib2/__init__.py', line 1544 in request
  (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File '/var/local/env-allura/lib/python2.7/site-packages/httplib2-0.7.4-py2.7.egg/httplib2/__init__.py', line 1294 in _request
  (response, content) = self._conn_request(conn, request_uri, method, body, headers)
File '/var/local/env-allura/lib/python2.7/site-packages/httplib2-0.7.4-py2.7.egg/httplib2/__init__.py', line 1230 in _conn_request
  conn.connect()
File '/var/local/env-allura/lib/python2.7/site-packages/httplib2-0.7.4-py2.7.egg/httplib2/__init__.py', line 890 in connect
  raise socket.error, msg

Related

Tickets: #4799

Discussion


Anonymous


Cancel   Add attachments