removing golang/temporal building
This commit is contained in:
@@ -271,11 +271,11 @@ enum SchedulerCommand {
|
||||
#[arg(long, help = "ID of the schedule to run")] // Explicitly make it --id
|
||||
id: String,
|
||||
},
|
||||
/// Check status of Temporal services (temporal scheduler only)
|
||||
#[command(about = "Check status of Temporal services")]
|
||||
/// Check status of scheduler services (deprecated - no external services needed)
|
||||
#[command(about = "Check status of scheduler services")]
|
||||
ServicesStatus {},
|
||||
/// Stop Temporal services (temporal scheduler only)
|
||||
#[command(about = "Stop Temporal services")]
|
||||
/// Stop scheduler services (deprecated - no external services needed)
|
||||
#[command(about = "Stop scheduler services")]
|
||||
ServicesStop {},
|
||||
/// Show cron expression examples and help
|
||||
#[command(about = "Show cron expression examples and help")]
|
||||
|
||||
@@ -1214,11 +1214,6 @@ pub async fn configure_settings_dialog() -> anyhow::Result<()> {
|
||||
"goose recipe github repo",
|
||||
"goose will pull recipes from this repo if not found locally.",
|
||||
)
|
||||
.item(
|
||||
"scheduler",
|
||||
"Scheduler Type",
|
||||
"Choose between built-in cron scheduler or Temporal workflow engine",
|
||||
)
|
||||
.interact()?;
|
||||
|
||||
match setting_type {
|
||||
@@ -1243,9 +1238,6 @@ pub async fn configure_settings_dialog() -> anyhow::Result<()> {
|
||||
"recipe" => {
|
||||
configure_recipe_dialog()?;
|
||||
}
|
||||
"scheduler" => {
|
||||
configure_scheduler_dialog()?;
|
||||
}
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
@@ -1580,60 +1572,6 @@ fn configure_recipe_dialog() -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn configure_scheduler_dialog() -> anyhow::Result<()> {
|
||||
let config = Config::global();
|
||||
|
||||
// Check if GOOSE_SCHEDULER_TYPE is set as an environment variable
|
||||
if std::env::var("GOOSE_SCHEDULER_TYPE").is_ok() {
|
||||
let _ = cliclack::log::info("Notice: GOOSE_SCHEDULER_TYPE environment variable is set and will override the configuration here.");
|
||||
}
|
||||
|
||||
// Get current scheduler type from config for display
|
||||
let current_scheduler: String = config
|
||||
.get_param("GOOSE_SCHEDULER_TYPE")
|
||||
.unwrap_or_else(|_| "legacy".to_string());
|
||||
|
||||
println!(
|
||||
"Current scheduler type: {}",
|
||||
style(¤t_scheduler).cyan()
|
||||
);
|
||||
|
||||
let scheduler_type = cliclack::select("Which scheduler type would you like to use?")
|
||||
.items(&[
|
||||
("legacy", "Built-in Cron (Default)", "Uses goose's built-in cron scheduler. Simple and reliable for basic scheduling needs."),
|
||||
("temporal", "Temporal", "Uses Temporal workflow engine for advanced scheduling features. Requires Temporal CLI to be installed.")
|
||||
])
|
||||
.interact()?;
|
||||
|
||||
match scheduler_type {
|
||||
"legacy" => {
|
||||
config.set_param("GOOSE_SCHEDULER_TYPE", Value::String("legacy".to_string()))?;
|
||||
cliclack::outro(
|
||||
"Set to Built-in Cron scheduler - simple and reliable for basic scheduling",
|
||||
)?;
|
||||
}
|
||||
"temporal" => {
|
||||
config.set_param(
|
||||
"GOOSE_SCHEDULER_TYPE",
|
||||
Value::String("temporal".to_string()),
|
||||
)?;
|
||||
cliclack::outro(
|
||||
"Set to Temporal scheduler - advanced workflow engine for complex scheduling",
|
||||
)?;
|
||||
println!();
|
||||
println!("📋 {}", style("Note:").bold());
|
||||
println!(" • Temporal scheduler requires Temporal CLI to be installed");
|
||||
println!(" • macOS: brew install temporal");
|
||||
println!(" • Linux/Windows: https://github.com/temporalio/cli/releases");
|
||||
println!(" • If Temporal is unavailable, goose will automatically fall back to the built-in scheduler");
|
||||
println!(" • The scheduling engines do not share the list of schedules");
|
||||
}
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn configure_max_turns_dialog() -> anyhow::Result<()> {
|
||||
let config = Config::global();
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ use goose::scheduler::{
|
||||
SchedulerError,
|
||||
};
|
||||
use goose::scheduler_factory::SchedulerFactory;
|
||||
use goose::temporal_scheduler::TemporalScheduler;
|
||||
use std::path::Path;
|
||||
|
||||
// Base64 decoding function - might be needed if recipe_source_arg can be base64
|
||||
@@ -260,74 +259,18 @@ pub async fn handle_schedule_run_now(id: String) -> Result<()> {
|
||||
}
|
||||
|
||||
pub async fn handle_schedule_services_status() -> Result<()> {
|
||||
// Check if we're using temporal scheduler
|
||||
let scheduler_type =
|
||||
std::env::var("GOOSE_SCHEDULER_TYPE").unwrap_or_else(|_| "temporal".to_string());
|
||||
|
||||
if scheduler_type != "temporal" {
|
||||
println!("Service management is only available for temporal scheduler.");
|
||||
println!("Set GOOSE_SCHEDULER_TYPE=temporal to use Temporal services.");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
println!("Checking Temporal services status...");
|
||||
|
||||
// Create a temporary TemporalScheduler to check status
|
||||
match TemporalScheduler::new().await {
|
||||
Ok(scheduler) => {
|
||||
let info = scheduler.get_service_info().await;
|
||||
println!("{}", info);
|
||||
}
|
||||
Err(e) => {
|
||||
println!("❌ Failed to check services: {}", e);
|
||||
println!();
|
||||
println!("💡 This might mean:");
|
||||
println!(" • Temporal CLI is not installed");
|
||||
println!(" • temporal-service binary is not available");
|
||||
println!(" • Services are not running");
|
||||
println!();
|
||||
println!("🔧 To fix this:");
|
||||
println!(" 1. Install Temporal CLI:");
|
||||
println!(" macOS: brew install temporal");
|
||||
println!(" Linux/Windows: https://github.com/temporalio/cli/releases");
|
||||
println!(" 2. Or use legacy scheduler: export GOOSE_SCHEDULER_TYPE=legacy");
|
||||
}
|
||||
}
|
||||
|
||||
println!("Service management has been removed as Temporal scheduler is no longer supported.");
|
||||
println!(
|
||||
"The built-in scheduler runs within the goose process and requires no external services."
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn handle_schedule_services_stop() -> Result<()> {
|
||||
// Check if we're using temporal scheduler
|
||||
let scheduler_type =
|
||||
std::env::var("GOOSE_SCHEDULER_TYPE").unwrap_or_else(|_| "temporal".to_string());
|
||||
|
||||
if scheduler_type != "temporal" {
|
||||
println!("Service management is only available for temporal scheduler.");
|
||||
println!("Set GOOSE_SCHEDULER_TYPE=temporal to use Temporal services.");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
println!("Stopping Temporal services...");
|
||||
|
||||
// Create a temporary TemporalScheduler to stop services
|
||||
match TemporalScheduler::new().await {
|
||||
Ok(scheduler) => match scheduler.stop_services().await {
|
||||
Ok(result) => {
|
||||
println!("{}", result);
|
||||
println!("\nNote: Services were running independently and have been stopped.");
|
||||
println!("They will be automatically restarted when needed.");
|
||||
}
|
||||
Err(e) => {
|
||||
println!("Failed to stop services: {}", e);
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
println!("Failed to initialize scheduler: {}", e);
|
||||
println!("Services may not be running or may have already been stopped.");
|
||||
}
|
||||
}
|
||||
|
||||
println!("Service management has been removed as Temporal scheduler is no longer supported.");
|
||||
println!(
|
||||
"The built-in scheduler runs within the goose process and requires no external services."
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user