Skip to content

Commit

Permalink
fix additional_events logic
Browse files Browse the repository at this point in the history
  • Loading branch information
indam23 committed Mar 22, 2021
1 parent 8787499 commit ca9a7aa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/docs/connectors/custom-connectors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ the host and port with the appropriate values from your running Rasa X or Rasa O
## The `blueprint` method

The `blueprint` method
<<<<<<< HEAD
needs to create a [sanic blueprint](https://sanic.readthedocs.io/en/stable/sanic/blueprints.html#blueprints)
=======
needs to create a [sanic blueprint](https://sanicframework.org/en/guide/best-practices/blueprints.html#overview)
>>>>>>> ad729fa3d02... sanic docs have moved update URLs in docs
that can be attached to a sanic server.
Your blueprint should have at least the two routes: `health` on the route `/`,
and `receive` on the route `/webhook` (see example custom channel below).
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/http-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ By default, the HTTP server runs as a single process. You can change the number
of worker processes using the `SANIC_WORKERS` environment variable. It is
recommended that you set the number of workers to the number of available CPU cores
(check out the
[Sanic docs](https://sanic.readthedocs.io/en/stable/sanic/deploying.html#workers)
[Sanic docs](https://sanicframework.org/en/guide/deployment/running.html#workers)
for more details). This will only work in combination with the
`RedisLockStore` (see [Lock Stores](./lock-stores.mdx).

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ model before trying to use it with this improved version.
* The `--num_threads` parameter was removed from the `run` command. The
server will always run single-threaded, but will now run asynchronously. If you want to
make use of multiple processes, feel free to check out the [Sanic server
documentation](https://sanic.readthedocs.io/en/stable/sanic/deploying.html#running-via-gunicorn).
documentation](https://sanicframework.org/en/guide/deployment/running.html#gunicorn).

* To avoid conflicts in script parameter names, connectors in the `run` command now need to be specified with
`--connector`, as `-c` is no longer supported. The maximum history in the `rasa visualize` command needs to be
Expand Down
5 changes: 3 additions & 2 deletions rasa/core/tracker_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,9 +1131,10 @@ def _additional_events(
) -> Iterator:
"""Return events from the tracker which aren't currently stored."""


number_of_events_since_last_session = self._event_query(
session, tracker.sender_id, fetch_events_from_all_sessions=self.retrieve_events_from_previous_conversation_sessions
session,
tracker.sender_id,
fetch_events_from_all_sessions=self.retrieve_events_from_previous_conversation_sessions,
).count()

return itertools.islice(
Expand Down

0 comments on commit ca9a7aa

Please sign in to comment.