Skip to content

Commit f9fa174

Browse files
committed
[Orion]FIX: workflow error
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
1 parent e577bbb commit f9fa174

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

orion-server/src/api.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,11 @@ async fn handle_immediate_task_dispatch(
615615
message: format!("Failed to insert builds into database: {}", err),
616616
};
617617
}
618-
println!("insert build");
618+
tracing::info!(
619+
"Created build record in DB with ID {} for task {}",
620+
build_id,
621+
task_id
622+
);
619623

620624
// Create WebSocket message for the worker (use first build's args)
621625
let msg = WSMessage::TaskBuild {

orion-server/src/scheduler.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ impl TaskScheduler {
448448
changes: pending_build_event.changes.clone(),
449449
target_id: pending_build_event
450450
.target_id
451-
.map_or_else(Uuid::nil, |id| id),
451+
.unwrap_or(Uuid::nil()),
452452
target_path: pending_build_event.target_path.clone().unwrap_or_default(),
453453
_worker_id: chosen_id.clone(),
454454
auto_retry_judger: AutoRetryJudger::new(),
@@ -509,7 +509,7 @@ impl TaskScheduler {
509509
//TODO: update target_id here
510510
pending_build_event
511511
.target_id
512-
.map_or_else(Uuid::nil, |id| id),
512+
.unwrap_or(Uuid::nil()),
513513
TargetState::Building,
514514
Some(start_at_tz),
515515
None,
@@ -542,7 +542,7 @@ impl TaskScheduler {
542542
// TODO: update target_id here
543543
pending_build_event
544544
.target_id
545-
.map_or_else(Uuid::nil, |id| id),
545+
.unwrap_or(Uuid::nil()),
546546
TargetState::Pending,
547547
Some(start_at_tz),
548548
None,

0 commit comments

Comments
 (0)