Skip to content

Commit

Permalink
Merge pull request #244 from dcSpark/nico/fix_is_finished_messages-en…
Browse files Browse the repository at this point in the history
…dpoint

fix is_finished
  • Loading branch information
nicarq authored Feb 20, 2024
2 parents 2661c40 + 06dcf4c commit 6760545
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/db/db_inbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,14 @@ impl ShinkaiDB {
};

// Determine if the inbox is finished
let is_finished = if inbox_id.starts_with("job::") {
let job = self.get_job(&inbox_id)?;
job.is_finished
let is_finished = if inbox_id.starts_with("job_inbox::") {
match InboxName::new(inbox_id.clone())? {
InboxName::JobInbox { unique_id, .. } => {
let job = self.get_job(&unique_id)?;
job.is_finished
}
_ => false,
}
} else {
false
};
Expand Down
2 changes: 1 addition & 1 deletion src/network/node_api_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ impl Node {
}
Ok(None) => shinkai_log(
ShinkaiLogOption::DetailedAPI,
ShinkaiLogLevel::Error,
ShinkaiLogLevel::Info,
format!("No file found in the inbox").as_str(),
),
Err(err) => shinkai_log(
Expand Down

0 comments on commit 6760545

Please sign in to comment.