mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
feat(ENG-21362): Environment Variables Store (#23930)
This commit is contained in:
@@ -3,7 +3,7 @@ pub var enabled = false;
|
||||
pub var check = std.once(load);
|
||||
|
||||
pub fn load() void {
|
||||
if (bun.getenvZAnyCase("BUN_POSTGRES_SOCKET_MONITOR_READER")) |monitor| {
|
||||
if (bun.env_var.BUN_POSTGRES_SOCKET_MONITOR_READER.get()) |monitor| {
|
||||
enabled = true;
|
||||
file = std.fs.cwd().createFile(monitor, .{ .truncate = true }) catch {
|
||||
enabled = false;
|
||||
|
||||
@@ -7,7 +7,7 @@ pub fn write(data: []const u8) void {
|
||||
}
|
||||
|
||||
pub fn load() void {
|
||||
if (bun.getenvZAnyCase("BUN_POSTGRES_SOCKET_MONITOR")) |monitor| {
|
||||
if (bun.env_var.BUN_POSTGRES_SOCKET_MONITOR.get()) |monitor| {
|
||||
enabled = true;
|
||||
file = std.fs.cwd().createFile(monitor, .{ .truncate = true }) catch {
|
||||
enabled = false;
|
||||
|
||||
@@ -984,7 +984,7 @@ pub fn hasQueryRunning(this: *PostgresSQLConnection) bool {
|
||||
}
|
||||
|
||||
pub fn canPipeline(this: *PostgresSQLConnection) bool {
|
||||
if (bun.getRuntimeFeatureFlag(.BUN_FEATURE_FLAG_DISABLE_SQL_AUTO_PIPELINING)) {
|
||||
if (bun.feature_flag.BUN_FEATURE_FLAG_DISABLE_SQL_AUTO_PIPELINING.get()) {
|
||||
@branchHint(.unlikely);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user