mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(scheduled_tasks): get wal-g backups bucket from env
This commit is contained in:
parent
8401c464c1
commit
26af2df720
2 changed files with 11 additions and 1 deletions
|
|
@ -95,6 +95,7 @@ pub struct ScheduledTasksConfig {
|
|||
pub expected_gateway_count: usize,
|
||||
pub gateway_url: String,
|
||||
pub prometheus_url: String,
|
||||
pub walg_s3_bucket: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Clone, Debug)]
|
||||
|
|
@ -157,6 +158,12 @@ impl PKConfig {
|
|||
.expect("missing avatar service config")
|
||||
}
|
||||
|
||||
pub fn scheduled_tasks(&self) -> &ScheduledTasksConfig {
|
||||
self.scheduled_tasks
|
||||
.as_ref()
|
||||
.expect("missing scheduled_tasks config")
|
||||
}
|
||||
|
||||
pub fn premium(&self) -> &PremiumConfig {
|
||||
self.premium.as_ref().expect("missing premium config")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,10 @@ async fn update_basebackup_ts(repo: String) -> anyhow::Result<()> {
|
|||
|
||||
env.insert(
|
||||
"WALG_S3_PREFIX".to_string(),
|
||||
format!("s3://pluralkit-backups/{repo}/"),
|
||||
format!(
|
||||
"s3://{}/{repo}/",
|
||||
libpk::config.scheduled_tasks().walg_s3_bucket
|
||||
),
|
||||
);
|
||||
|
||||
let output = Command::new("wal-g")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue