Skip to content

Commit

Permalink
Merge pull request #494 from 0RAJA/feat_bkbase_storage
Browse files Browse the repository at this point in the history
feat: 存储-存储编辑重启 bkbase 入库任务 --story=121354170
  • Loading branch information
0RAJA authored Jan 2, 2025
2 parents d7e617c + ee9e26c commit 91c26e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/backend/config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"bkvision": os.getenv("BKAPP_FEATURE_BKVISION", "deny"),
"bknotice": os.getenv("BKAPP_FEATURE_BKNOTICE", "deny"),
"bkbase_data_source": os.getenv("BKAPP_FEATURE_BKBASE_DATA_SOURCE", "on"),
"storage_edit": os.getenv("BKAPP_FEATURE_STORAGE_EDIT", "deny"),
}

# BkLog
Expand Down
7 changes: 6 additions & 1 deletion src/backend/services/web/databus/storage/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ def perform_request(self, validated_request_data):
data = api.bk_log.update_storage(validated_request_data)
StorageOperateLog.create(validated_request_data["cluster_id"])
self.record_config(data["cluster_config"]["cluster_id"], validated_request_data)
# 更新采集插件
namespace = validated_request_data["namespace"]
CollectorPlugin.objects.filter(
namespace=namespace, plugin_scene__in=[PluginSceneChoices.COLLECTOR.value]
).update(storage_changed=True)
return data


Expand All @@ -104,7 +109,7 @@ def perform_request(self, validated_request_data):
)
# 设置采集插件
CollectorPlugin.objects.filter(
namespace=namespace, plugin_scene__in=[PluginSceneChoices.COLLECTOR.value, PluginSceneChoices.FLOW.value]
namespace=namespace, plugin_scene__in=[PluginSceneChoices.COLLECTOR.value]
).update(storage_changed=True)
return int(default_cluster_config.config_value)

Expand Down

0 comments on commit 91c26e3

Please sign in to comment.