diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-10-27 17:38:28 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-10-27 17:38:28 +0800 |
| commit | 2954fc5ce35126e4cf9ebfc64043c0e52a990e01 (patch) | |
| tree | 9fa6948113b3ae7a0e29c8c0374f046872a86d4d /crates/vcs_actions/src/actions/local_actions.rs | |
| parent | 9766cdc3f0a741a7548c413297425efd298af8f2 (diff) | |
update: ActionContext 1. Rename `local` to `proc_on_local` 2. Add
`is_remote_action`
Diffstat (limited to 'crates/vcs_actions/src/actions/local_actions.rs')
| -rw-r--r-- | crates/vcs_actions/src/actions/local_actions.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/vcs_actions/src/actions/local_actions.rs b/crates/vcs_actions/src/actions/local_actions.rs index c2d9f4f..e2788ff 100644 --- a/crates/vcs_actions/src/actions/local_actions.rs +++ b/crates/vcs_actions/src/actions/local_actions.rs @@ -13,10 +13,10 @@ pub async fn hello_world_action(ctx: ActionContext, _n: ()) -> Result<(), TcpTar )); }; - if ctx.is_local() { + if ctx.is_proc_on_local() { // Local execution - communication is handled by on_proc_begin info!("Hello World action executed locally"); - } else if ctx.is_remote() { + } else if ctx.is_proc_on_remote() { // Remote execution - read the message from the client let read = instance.lock().await.read_text().await?; info!("{}", read) @@ -37,11 +37,11 @@ pub async fn set_upstream_vault_action( )); }; - if ctx.is_local() { + if ctx.is_proc_on_local() { // Invoke on local // Send the message to the server let _ = instance.lock().await.write_text("Hello World!").await; - } else if ctx.is_remote() { + } else if ctx.is_proc_on_remote() { // Remote execution - read the message from the client let read = instance.lock().await.read_text().await?; info!("Received: {}", read) |
