[PR #195] [MERGED] add exist for self.session.storage #362

Closed
opened 2026-02-16 01:15:44 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/195
Author: @hjlarry
Created: 4/11/2025
Status: Merged
Merged: 4/11/2025
Merged by: @Yeuoly

Base: mainHead: p11


📝 Commits (1)

  • 1014bb9 add exist for self.session.storage

📊 Changes

5 files changed (+42 additions, -6 deletions)

View changed files

📝 internal/core/dify_invocation/types.go (+5 -4)
📝 internal/core/persistence/persistence.go (+19 -0)
📝 internal/core/persistence/type.go (+1 -0)
📝 internal/core/persistence/wrapper.go (+5 -2)
📝 internal/core/plugin_daemon/backwards_invocation/task.go (+12 -0)

📄 Description

Currently, get or delete a non-existent key will raises an exception, although this is a common operation.

On the other hand, we can use the storage as a pipeline, frequently retrieving data from it. This results in numerous error logs on the daemon. Using 'exists' can significantly reduce these error logs.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/195 **Author:** [@hjlarry](https://github.com/hjlarry) **Created:** 4/11/2025 **Status:** ✅ Merged **Merged:** 4/11/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `p11` --- ### 📝 Commits (1) - [`1014bb9`](https://github.com/langgenius/dify-plugin-daemon/commit/1014bb9b6266005ea4374897406cb30c544cd546) add `exist` for self.session.storage ### 📊 Changes **5 files changed** (+42 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `internal/core/dify_invocation/types.go` (+5 -4) 📝 `internal/core/persistence/persistence.go` (+19 -0) 📝 `internal/core/persistence/type.go` (+1 -0) 📝 `internal/core/persistence/wrapper.go` (+5 -2) 📝 `internal/core/plugin_daemon/backwards_invocation/task.go` (+12 -0) </details> ### 📄 Description Currently, get or delete a non-existent key will raises an exception, although this is a common operation. On the other hand, we can use the storage as a pipeline, frequently retrieving data from it. This results in numerous error logs on the daemon. Using 'exists' can significantly reduce these error logs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:15:44 -05:00
yindo closed this issue 2026-02-16 01:15:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#362