Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Tatarintsev committed Jan 16, 2024
1 parent 7388d5e commit 28f8e56
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions query-engine/core/src/executor/request_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ tokio::task_local! {
///
/// If we had a query context we carry for the entire lifetime of the query, it would belong there.
pub(crate) fn get_request_now() -> PrismaValue {

REQUEST_CONTEXT
.try_with(|rc| rc.request_now.clone())
.unwrap_or_else(|_|
REQUEST_CONTEXT.try_with(|rc| rc.request_now.clone()).unwrap_or_else(|_|
// FIXME: we want to bypass task locals if this code is executed outside of a tokio context. As
// of this writing, it happens only in the query validation test suite.
//
// Eventually, this will go away when we have a plain query context reference we pass around.
// Skipping the branch for WASM since there we never have a running tokio runtime
PrismaValue::DateTime(chrono::Utc::now().into())
)
PrismaValue::DateTime(chrono::Utc::now().into()))
}

/// The engine protocol used for the whole duration of a request.
Expand Down

0 comments on commit 28f8e56

Please sign in to comment.