Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using this in long-running services #2

Open
djtango opened this issue Jun 16, 2023 · 1 comment
Open

Using this in long-running services #2

djtango opened this issue Jun 16, 2023 · 1 comment

Comments

@djtango
Copy link

djtango commented Jun 16, 2023

Hi I'm considering how this may work using it in a long running web-server, are there any built in capabilities to manage space creep in things like :a-frame.interceptor-chain/history?

@mccraigmccraig
Copy link
Contributor

mccraigmccraig commented Jul 4, 2023

hey @djtango

sorry for the delay - i need to get GH notifications on my phone!

history is not global - it is local to a single event's interceptor-chain context - there are two possibilities:

  1. if you are using a re-frame style dispatch against a single processor then each event's interceptor-chain context is created at the start of processing for that event, and discarded when processing for that event completes
  2. if you are using dispatch-sync then you have full control - you get (a promise of) the interceptor-chain context back from dispatch-sync

with backend stuff it's actually turned out that i've used dispatch-sync exclusively (dispatch-sync is perhaps quite a confusing name - it's not synchronous, but it does synchronize on the result of fully processing an event. it's named after the re-frame dispatch-sync), in response to some external input such as an API request or a kafka message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants