Skip to content

Commit

Permalink
[Http Actions -> FunRun] Move function execution (#30517)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 2e9c7f1241bb45674614620c3f6aca6933b3071d
  • Loading branch information
jordanhunt22 authored and Convex, Inc. committed Oct 9, 2024
1 parent 7bcb6cb commit 8213ae9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ use model::modules::{
ModuleModel,
HTTP_MODULE_PATH,
};
use rand::Rng;
use sync_types::{
CanonicalizedUdfPath,
FunctionName,
Expand Down Expand Up @@ -119,7 +118,7 @@ impl<RT: Runtime> ApplicationFunctionRunner<RT> {
// completion, but still stream the response as it comes in, so we
// create another channel here.
let (isolate_response_sender, mut isolate_response_receiver) = mpsc::unbounded();
let outcome_future = if self.runtime.rng().gen_bool(*EXECUTE_HTTP_ACTIONS_IN_FUNRUN) {
let outcome_future = if *EXECUTE_HTTP_ACTIONS_IN_FUNRUN {
self.isolate_functions
.execute_http_action(
tx,
Expand Down
6 changes: 3 additions & 3 deletions crates/common/src/knobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,9 +1145,9 @@ pub static USHER_MAX_CONCURRENT_STREAMS_PER_CHANNEL: LazyLock<usize> =
pub static MIGRATION_REWRITE_BATCH_SIZE: LazyLock<usize> =
LazyLock::new(|| env_config("MIGRATION_REWRITE_BATCH_SIZE", 100));

/// Fraction that represents the percentage of HTTP actions to execute in FunRun
pub static EXECUTE_HTTP_ACTIONS_IN_FUNRUN: LazyLock<f64> =
LazyLock::new(|| env_config("EXECUTE_HTTP_ACTIONS_IN_FUNRUN", 0.0));
/// Whether or not HTTP actions are executed in FunRun
pub static EXECUTE_HTTP_ACTIONS_IN_FUNRUN: LazyLock<bool> =
LazyLock::new(|| env_config("EXECUTE_HTTP_ACTIONS_IN_FUNRUN", false));

/// If an import is taking longer than a day, it's a problem (and our fault).
/// But the customer is probably no longer waiting so we should fail the import.
Expand Down

0 comments on commit 8213ae9

Please sign in to comment.