Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

feat(si-layer): basic activities support#3455

Merged
si-bors-ng[bot] merged 1 commit intomainfrom
af/activities-and-web-events
Mar 19, 2024
Merged

feat(si-layer): basic activities support#3455
si-bors-ng[bot] merged 1 commit intomainfrom
af/activities-and-web-events

Conversation

@adamhjk
Copy link
Copy Markdown
Contributor

@adamhjk adamhjk commented Mar 18, 2024

This adds basic activities into layerdb. Activities represent events that we expect someone else to react to. The first two examples are a quick port of the rebaser events.

let stream = layerdb.activity_subscribe(Some([vec![ActivityPayloadDiscriminates::RebaseFinished])).await?;

layerdb.activity_publish(&rebase_request)?;
layerdb.activity_publish(&rebase_finished)?;

The resulting stream would only receive the second activity event. If you want to subscribe to all events, pass 'None' in as the argument to activity_subscribe.

This adds basic activities into layerdb. Activities represent events
that we expect someone else to react to. The first two examples are a
quick port of the rebaser events.

```rust
let stream = layerdb.activity_subscribe(Some([vec![ActivityPayloadDiscriminates::RebaseFinished])).await?;

layerdb.activity_publish(&rebase_request)?;
layerdb.activity_publish(&rebase_finished)?;
```

The resulting stream would only receive the second activity event. If
you want to subscribe to all events, pass 'None' in as the argument to
activity_subscribe.
@adamhjk adamhjk force-pushed the af/activities-and-web-events branch from 864d6ec to 9bb00c6 Compare March 18, 2024 22:36
Copy link
Copy Markdown
Contributor

@nickgerace nickgerace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamhjk
Copy link
Copy Markdown
Contributor Author

adamhjk commented Mar 19, 2024

bors merge

@si-bors-ng
Copy link
Copy Markdown
Contributor

si-bors-ng Bot commented Mar 19, 2024

Build succeeded:

@si-bors-ng si-bors-ng Bot merged commit a6dca45 into main Mar 19, 2024
@si-bors-ng si-bors-ng Bot deleted the af/activities-and-web-events branch March 19, 2024 00:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants