feat(ENG-21362): Environment Variables Store (#23930)

This commit is contained in:
Marko Vejnovic
2025-10-23 23:08:08 -07:00
committed by GitHub
parent d648547942
commit e76570f452
67 changed files with 886 additions and 388 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;
}