fix: rename overview.md files to avoid conflicts and add collection name

This commit is contained in:
Timur Gordon
2025-11-14 11:01:43 +01:00
parent f67296cd25
commit 2c24b120de
20 changed files with 85 additions and 91 deletions

View File

@@ -73,7 +73,6 @@ pub struct Job {
pub context_id: String,
pub payload: String,
pub runner: String, // name of the runner to execute this job
pub executor: String, // name of the executor the runner will use to execute this job
pub timeout: u64, // timeout in seconds
#[cfg_attr(target_arch = "wasm32", wasm_bindgen(skip))]
pub env_vars: HashMap<String, String>, // environment variables for script execution
@@ -109,7 +108,6 @@ impl Job {
context_id: String,
payload: String,
runner: String,
executor: String,
) -> Self {
let now = Utc::now();
Self {
@@ -118,7 +116,6 @@ impl Job {
context_id,
payload,
runner,
executor,
timeout: 300, // 5 minutes default
env_vars: HashMap::new(),
created_at: now,
@@ -137,13 +134,12 @@ impl Job {
env_vars_sorted.sort_by_key(|&(k, _)| k);
format!(
"{}:{}:{}:{}:{}:{}:{}:{:?}",
"{}:{}:{}:{}:{}:{}:{:?}",
self.id,
self.caller_id,
self.context_id,
self.payload,
self.runner,
self.executor,
self.timeout,
env_vars_sorted
)
@@ -202,7 +198,6 @@ pub struct JobBuilder {
context_id: String,
payload: String,
runner: String,
executor: String,
timeout: u64, // timeout in seconds
env_vars: HashMap<String, String>,
signatures: Vec<JobSignature>,
@@ -215,7 +210,6 @@ impl JobBuilder {
context_id: "".to_string(),
payload: "".to_string(),
runner: "".to_string(),
executor: "".to_string(),
timeout: 300, // 5 minutes default
env_vars: HashMap::new(),
signatures: Vec::new(),
@@ -246,11 +240,6 @@ impl JobBuilder {
self
}
/// Set the executor for this job
pub fn executor(mut self, executor: &str) -> Self {
self.executor = executor.to_string();
self
}
/// Set the timeout for job execution (in seconds)
pub fn timeout(mut self, timeout: u64) -> Self {
@@ -311,16 +300,12 @@ impl JobBuilder {
if self.runner.is_empty() {
return Err(JobError::InvalidData("runner is required".to_string()));
}
if self.executor.is_empty() {
return Err(JobError::InvalidData("executor is required".to_string()));
}
let mut job = Job::new(
self.caller_id,
self.context_id,
self.payload,
self.runner,
self.executor,
);
job.timeout = self.timeout;