File tree Expand file tree Collapse file tree 3 files changed +19
-7
lines changed
Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
12import os
23import re
34import sys
67from urllib .parse import urlparse
78import boto3
89from botocore .client import Config
9- import requests
10+ import time
1011
1112# 数据库清理备份脚本
1213# 1. 按要求备份数据,并保存到指定路径
@@ -89,13 +90,16 @@ def check_bool(key):
8990s3_bucket = os .environ ["S3_BUCKET" ] if check_var ("S3_BUCKET" ) else None
9091s3_prefix = os .environ ["S3_PREFIX" ] if check_var ("S3_PREFIX" ) else DEFAULT_S3_PREFIX
9192s3_region = os .environ ["S3_REGION" ] if check_var ("S3_REGION" ) else None
92- s3_region = os .environ ["S3_REGION" ] if check_var ("S3_REGION" ) else None
9393s3_signature_version = (
9494 os .environ ["S3_SIGNATURE_VERSION" ] if check_var ("S3_SIGNATURE_VERSION" ) else None
9595)
9696
9797# 计算当前日期,按照 年月日时分 格式
98- date = (datetime .now () + timedelta (hours = 8 )).strftime ("%Y%m%d%H%M%S" )
98+ date = (
99+ datetime .now () + timedelta (hours = 8 )
100+ if not time .localtime ().tm_gmtoff
101+ else datetime .now ()
102+ ).strftime ("%Y%m%d%H%M%S" )
99103
100104
101105def get_dbname_from_mongo_uri (uri ):
@@ -185,7 +189,9 @@ def upload_s3(prefix):
185189 config_s3 ["addressing_style" ] = "virtual"
186190
187191 if s3_region and s3_signature_version :
188- config = Config (s3 = config_s3 , signature_version = "s3" , region_name = s3_region )
192+ config = Config (
193+ s3 = config_s3 , signature_version = s3_signature_version , region_name = s3_region
194+ )
189195 elif s3_region :
190196 config = Config (s3 = config_s3 , region_name = s3_region )
191197 elif s3_signature_version :
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
12import os
23import re
34import sys
45from datetime import datetime , timedelta
56import subprocess
67import boto3
78from botocore .client import Config
9+ import time
810
911# 数据库还原
1012
@@ -66,7 +68,11 @@ def check_bool(key):
6668s3_prefix = os .environ ["S3_PREFIX" ] if check_var ("S3_PREFIX" ) else DEFAULT_S3_PREFIX
6769s3_region = os .environ ["S3_REGION" ] if check_var ("S3_REGION" ) else None
6870
69- date = (datetime .now () + timedelta (hours = 8 )).strftime ("%Y%m%d%H%M%S" )
71+ date = (
72+ datetime .now () + timedelta (hours = 8 )
73+ if not time .localtime ().tm_gmtoff
74+ else datetime .now ()
75+ ).strftime ("%Y%m%d%H%M%S" )
7076
7177
7278def get_files (compiled_regex ):
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ type: application
1515# This is the chart version. This version number should be incremented each time you make changes
1616# to the chart and its templates, including the app version.
1717# Versions are expected to follow Semantic Versioning (https://semver.org/)
18- version : 1.6.2
18+ version : 1.6.3
1919
2020# This is the version number of the application being deployed. This version number should be
2121# incremented each time you make changes to the application. Versions are not expected to
2222# follow Semantic Versioning. They should reflect the version the application is using.
2323# It is recommended to use it with quotes.
24- appVersion : " 1.6.2 "
24+ appVersion : " 1.6.3 "
You can’t perform that action at this time.
0 commit comments