Skip to content

Commit 94e1e7b

Browse files
committed
fix: update image before migrations, as we need to generate srcinfo
1 parent 34fff34 commit 94e1e7b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

server/src/main.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ async fn main() -> anyhow::Result<()> {
7575
// creating image scheduler
7676
let image_scheduler = ImageScheduler::new(runner.clone());
7777

78+
// yes, this will wait before starting the api, because after updates stuff
79+
// can't be built without a new image
80+
// we'll do this before the migrations because some need the new container
81+
// already
82+
image_scheduler.run_sync().await;
83+
7884
// cleanup unfinished builds
7985
if let Err(e) = cleanup_unfinished(&db).await {
8086
error!("failed to cleanup unfinished builds: {e:#}")
@@ -97,10 +103,6 @@ async fn main() -> anyhow::Result<()> {
97103
.context(format!("failed to start schedule for package {}", &package.base))?;
98104
}
99105

100-
// yes, this will wait before starting the api, because after updates stuff
101-
// can't be built without a new image
102-
image_scheduler.run_sync().await;
103-
104106
if config::CONFIG.build_cli {
105107
if let Err(e) = package::try_add_cli(&db, &mut schedule, &srcinfo_generator).await {
106108
error!("failed to add cli package: {e:#}")

0 commit comments

Comments
 (0)