11# -*- coding: utf-8 -*-
2- """
3- TencentBlueKing is pleased to support the open source community by making
4- 蓝鲸智云 - PaaS 平台 (BlueKing - PaaS System) available.
5- Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
6- Licensed under the MIT License (the "License"); you may not use this file except
7- in compliance with the License. You may obtain a copy of the License at
8-
9- http://opensource.org/licenses/MIT
10-
11- Unless required by applicable law or agreed to in writing, software distributed under
12- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13- either express or implied. See the License for the specific language governing permissions and
14- limitations under the License.
15-
16- We undertake not to change the open source license (MIT license) applicable
17- to the current version of the project delivered to anyone in the future.
18- """
2+ # TencentBlueKing is pleased to support the open source community by making
3+ # 蓝鲸智云 - PaaS 平台 (BlueKing - PaaS System) available.
4+ # Copyright (C) Tencent. All rights reserved.
5+ # Licensed under the MIT License (the "License"); you may not use this file except
6+ # in compliance with the License. You may obtain a copy of the License at
7+ #
8+ # http://opensource.org/licenses/MIT
9+ #
10+ # Unless required by applicable law or agreed to in writing, software distributed under
11+ # the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
12+ # either express or implied. See the License for the specific language governing permissions and
13+ # limitations under the License.
14+ #
15+ # We undertake not to change the open source license (MIT license) applicable
16+ # to the current version of the project delivered to anyone in the future.
17+
1918import atexit
2019import errno
2120import functools
2726from django .conf import settings
2827from filelock import FileLock
2928from paas_service .models import Plan , ServiceInstance
29+
3030from svc_bk_repo .monitoring .models import RepoQuotaStatistics
3131from svc_bk_repo .vendor .helper import BKGenericRepoManager
3232
@@ -47,7 +47,7 @@ def process_exists(pid: int):
4747 # in the process group of the calling process.
4848 # On certain systems 0 is a valid PID but we have no way
4949 # to know that in a portable fashion.
50- raise ValueError (' invalid PID 0' )
50+ raise ValueError (" invalid PID 0" )
5151 try :
5252 os .kill (pid , 0 )
5353 except OSError as err :
@@ -93,7 +93,7 @@ def get_repo_manager(plan_id: str):
9393 return manager
9494
9595
96- @scheduler .scheduled_job (' interval' , minutes = settings .BKREPO_COLLECT_INTERVAL_MINUTES )
96+ @scheduler .scheduled_job (" interval" , minutes = settings .BKREPO_COLLECT_INTERVAL_MINUTES )
9797def update_bkrepo_quota_statistics ():
9898 """Update bkrepo quota statistics periodically"""
9999 logger .info ("Starting update bkrepo quota." )
0 commit comments