Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ registry.settings.update({

After:
```py
def get_job_group_url():
def get_job_group_url(job_group, pyramid_request):
return 'https://localhost:8080/batch'

registry.settings.update({
Expand Down Expand Up @@ -72,7 +72,7 @@ registry.settings.update({
`get_job_group_url` will be supplied two parameters - the **job group** that pyramid_hypernova will be making a request for and the **pyramid request**:

```py
def get_batch_url(job_group, pyramid_request): ...
def get_job_group_url(job_group, pyramid_request): ...
```

This will be called right before send _on every job group request_. If you're doing an expensive operation to retrieve this url, consider memoizing it.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Usage
In your service's Pyramid configuration (e.g. `webapp.py`), you can configure the Pyramid tween like so:

```python
def get_batch_url():
def get_job_group_url(job_group, pyramid_request):
return 'https://localhost:8080/batch'

config.registry.settings['pyramid_hypernova.get_batch_url'] = get_batch_url
config.registry.settings['pyramid_hypernova.get_job_group_url'] = get_job_group_url
config.add_tween('pyramid_hypernova.tweens.hypernova_tween_factory')
```

Expand Down