Commit bf34c2e3 authored by q4speed's avatar q4speed

Merge remote-tracking branch 'origin/dev' into dev

parents 54bcb33a 6d15f60c
...@@ -19,7 +19,7 @@ FORKS = 10 ...@@ -19,7 +19,7 @@ FORKS = 10
TIMEOUT = 60 TIMEOUT = 60
logger = get_logger(__file__) logger = get_logger(__file__)
CACHE_MAX_TIME = 60*60*60 CACHE_MAX_TIME = 60*60*60
disk_pattern = re.compile(r'^hd|sd') disk_pattern = re.compile(r'^hd|sd|xvd')
@shared_task @shared_task
......
...@@ -327,6 +327,10 @@ def capacity_convert(size, expect='auto', rate=1000): ...@@ -327,6 +327,10 @@ def capacity_convert(size, expect='auto', rate=1000):
if rate > std_size/rate_ > 1: if rate > std_size/rate_ > 1:
expect = unit expect = unit
break break
if expect not in rate_mapping:
expect = 'K'
expect_size = std_size / rate_mapping[expect] expect_size = std_size / rate_mapping[expect]
return expect_size, expect return expect_size, expect
......
...@@ -119,5 +119,5 @@ class ProductionConfig(Config): ...@@ -119,5 +119,5 @@ class ProductionConfig(Config):
# Default using Config settings, you can write if/else for different env # Default using Config settings, you can write if/else for different env
config = Config() config = DevelopmentConfig()
openssl brew install libtiff libjpeg webp little-cms2 brew install libtiff libjpeg webp little-cms2 openssl
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment