Allow any .gbai bucket (remove gbo- prefix requirement)
All checks were successful
BotServer CI/CD / build (push) Successful in 5m19s
All checks were successful
BotServer CI/CD / build (push) Successful in 5m19s
This commit is contained in:
parent
9ba689c30f
commit
f0b2b916c8
1 changed files with 6 additions and 1 deletions
|
|
@ -922,10 +922,15 @@ async fn start_drive_monitors(
|
||||||
Ok(result) => {
|
Ok(result) => {
|
||||||
for bucket in result.buckets().iter().filter_map(|b| b.name()) {
|
for bucket in result.buckets().iter().filter_map(|b| b.name()) {
|
||||||
let name = bucket.to_string();
|
let name = bucket.to_string();
|
||||||
if !name.ends_with(".gbai") || !name.starts_with("gbo-") {
|
if !name.ends_with(".gbai") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let bot_name = name.strip_suffix(".gbai").unwrap_or(&name);
|
let bot_name = name.strip_suffix(".gbai").unwrap_or(&name);
|
||||||
|
let bot_name = if bot_name.starts_with("gbo-") {
|
||||||
|
bot_name.strip_prefix("gbo-").unwrap_or(bot_name)
|
||||||
|
} else {
|
||||||
|
bot_name
|
||||||
|
};
|
||||||
|
|
||||||
let exists = {
|
let exists = {
|
||||||
let pool_check = pool_clone.clone();
|
let pool_check = pool_clone.clone();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue