2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2025-01-24 23:58:27 +00:00

Fix typing issues in push-backup

This commit is contained in:
Lev Vereshchagin 2022-02-25 12:20:39 +03:00
parent d5bda7e336
commit b74038ca63

View File

@ -3,7 +3,7 @@
import argparse
import os
import sys
from typing import List
from typing import Any, List, cast
import boto3
import frappe
@ -31,14 +31,17 @@ def get_bucket(arguments: Arguments):
def get_files(site_name: str):
frappe.connect(site_name)
conf = cast(Any, frappe.conf)
backup_generator = BackupGenerator(
db_name=frappe.conf.db_name,
user=frappe.conf.db_name,
password=frappe.conf.db_password,
db_name=conf.db_name,
user=conf.db_name,
password=conf.db_password,
db_host=frappe.db.host,
db_port=frappe.db.port,
db_type=frappe.conf.db_type,
db_type=conf.db_type,
)
recent_backup_files = backup_generator.get_recent_backup(24)
return [f for f in recent_backup_files if f]