MCPcopy
hub / github.com/celery/celery / as_uri

Method as_uri

celery/backends/base.py:167–174  ·  view source on GitHub ↗

Return the backend as an URI, sanitizing the password or not.

(self, include_password=False)

Source from the content-addressed store, hash-verified

165 self.url = url
166
167 def as_uri(self, include_password=False):
168 """Return the backend as an URI, sanitizing the password or not."""
169 # when using maybe_sanitize_url(), "/" is added
170 # we're stripping it for consistency
171 if include_password:
172 return self.url
173 url = maybe_sanitize_url(self.url or '')
174 return url[:-1] if url.endswith(':///') else url
175
176 def mark_as_started(self, task_id, **meta):
177 """Mark a task as started."""

Callers 11

test_urlMethod · 0.95
startup_infoMethod · 0.45
startup_infoMethod · 0.45
loopMethod · 0.45
startMethod · 0.45
_error_handlerMethod · 0.45
maybe_censorFunction · 0.45
_error_handlerFunction · 0.45
workersFunction · 0.45
reconnectMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_urlMethod · 0.76