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

feat(processing_engine): Add REST API endpoints for activating and deactivating triggers. #25711

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

jacksonrnewhouse
Copy link
Contributor

I've also added support for deleting plugins. In particular, a plugin can't be deleted if it is associated with a trigger. I plan on adding deletes for triggers shortly.

In order to do this I needed to use a separate channel per trigger, rather than them all looking at a broadcast channel. This in turn caused notify() to need to be async. This should be fine as notify_and_snapshot() already was.

Tests should pass both with and without the system-py feature.

@jacksonrnewhouse jacksonrnewhouse force-pushed the processing_engine/activate_deactivate_delete branch from 11b3d8e to c1b0b4c Compare December 27, 2024 01:18
}

#[derive(Debug, Serialize, Deserialize, Eq, PartialEq, Clone)]
pub struct DeletePlugin {
Copy link
Member

Choose a reason for hiding this comment

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

is this one needed with DeletePluginDefinition already defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I'll delete it.

let mut senders = self.plugin_event_tx.lock().await;

// TODO: should we be checking for replacements?
let (plugin_tx, plugin_rx) = mpsc::channel(4);
Copy link
Member

Choose a reason for hiding this comment

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

why the 4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There shouldn't be that many messages in it, as right now there will only be one message per WAL file, wanted to leave a bit of room for cancel signals and backing up.

@jacksonrnewhouse jacksonrnewhouse force-pushed the processing_engine/activate_deactivate_delete branch from 2a1ba80 to 5d5dc3b Compare December 30, 2024 16:46
@jacksonrnewhouse jacksonrnewhouse merged commit 29dacc3 into main Jan 2, 2025
13 checks passed
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

Successfully merging this pull request may close these issues.

2 participants