Skip to main content

open_db

Function open_db 

Source
fn open_db(app_support: &Path, config_dir: &Path) -> Option<Db>
Expand description

Open this config dir’s redb store, creating the directories first. Returns None (with a warn) when they can’t be created or the DB can’t open - forge then runs without durable crons, subscriptions, tasks or dynamic workers this session (hard rule #14: no cwd fallback).

The store is keyed by the config dir, as the lock is. A machine-wide <app_support>/db.redb from before the split is adopted once, by the default config dir; a second config dir starts empty, which is the isolation this keying exists for.