Return the backend as an URI, sanitizing the password or not.
(self, include_password=False)
| 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.""" |
no outgoing calls