Skip to content

Commit 11b5d64

Browse files
committed
agent_workers_oss proxy file
1 parent 6ffb40b commit 11b5d64

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Author: Ruben Fiszel
3+
* Copyright: Windmill Labs, Inc 2042
4+
* This file and its contents are licensed under the AGPLv3 License.
5+
* Please see the included NOTICE for copyright information and
6+
* LICENSE-AGPL for a copy of the license.
7+
*/
8+
9+
use crate::db::DB;
10+
11+
use axum::Router;
12+
13+
use serde::{Deserialize, Serialize};
14+
15+
pub fn global_service() -> Router {
16+
crate::agent_workers_ee::global_service()
17+
}
18+
19+
pub fn workspaced_service(
20+
db: DB,
21+
_base_internal_url: String,
22+
) -> (
23+
Router,
24+
Vec<tokio::task::JoinHandle<()>>,
25+
Option<windmill_worker::JobCompletedSender>,
26+
) {
27+
crate::agent_workers_ee::workspaced_service()
28+
}
29+
30+
pub use crate::agent_workers_ee::AgentAuth;
31+
pub use crate::agent_workers_ee::AgentCache;

backend/windmill-api/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::{
2828
};
2929

3030
#[cfg(feature = "agent_worker_server")]
31-
use agent_workers_ee::AgentCache;
31+
use agent_workers_oss::AgentCache;
3232

3333
use anyhow::Context;
3434
use argon2::Argon2;
@@ -62,7 +62,9 @@ use crate::scim_ee::has_scim_token;
6262
use windmill_common::error::AppError;
6363

6464
#[cfg(feature = "agent_worker_server")]
65-
mod agent_workers_ee;
65+
mod agent_workers_oss;
66+
#[cfg(feature = "agent_worker_server")]
67+
mod agent_workers_oss;
6668
mod ai;
6769
mod apps;
6870
pub mod args;
@@ -497,7 +499,7 @@ pub async fn run_server(
497499
#[cfg(feature = "agent_worker_server")]
498500
let (agent_workers_router, agent_workers_bg_processor, agent_workers_killpill_tx) =
499501
if server_mode {
500-
agent_workers_ee::workspaced_service(db.clone(), _base_internal_url.clone())
502+
agent_workers_oss::workspaced_service(db.clone(), _base_internal_url.clone())
501503
} else {
502504
(Router::new(), vec![], None)
503505
};
@@ -621,7 +623,7 @@ pub async fn run_server(
621623
.nest("/agent_workers", {
622624
#[cfg(feature = "agent_worker_server")]
623625
{
624-
agent_workers_ee::global_service().layer(Extension(agent_cache.clone()))
626+
agent_workers_oss::global_service().layer(Extension(agent_cache.clone()))
625627
}
626628
#[cfg(not(feature = "agent_worker_server"))]
627629
{

0 commit comments

Comments
 (0)