feat: enable checking if it should actually run
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2025-01-04 01:52:05 +01:00
parent 83294306a4
commit 03e23c7d9d
4 changed files with 36 additions and 3 deletions

View File

@@ -124,11 +124,21 @@ impl InnerPluginStore {
pub async fn execute(&mut self, plugin: &str) -> anyhow::Result<()> {
let plugin = self.ensure_plugin(plugin).await?;
plugin
if plugin
.interface0
.call_execute(&mut self.store)
.call_should_run(&mut self.store)
.await
.context("Failed to call add function")
.context("Failed to call should run")?
{
tracing::info!("job was marked as required to run");
return plugin
.interface0
.call_execute(&mut self.store)
.await
.context("Failed to call add function");
}
Ok(())
}
async fn ensure_plugin(&mut self, plugin: &str) -> anyhow::Result<Churn> {