Closed mrhan1993 closed 9 months ago
@konieshadow 测一下
i think this is unnecessary dependency, if you wanna use that just add sqlite and pass it. We already have a webhook feature you can keep the history on a remote location using webhook too.
@bsormagec I've been thinking about this feature for a long time. It originated from https://github.com/konieshadow/Fooocus-API/issues/92 , and when I tried to solve the problem of out-of-sync among pod tasks in K8s, I found that persistent storage was indeed an effective method. But as you said, I've always had doubts about its usefulness. I don't think most of the scenarios are useful, and I still think so. Therefore, whether to merge or not is worth discussing.
@bsormagec I've been thinking about this feature for a long time. It originated from #92 , and when I tried to solve the problem of out-of-sync among pod tasks in K8s, I found that persistent storage was indeed an effective method. But as you said, I've always had doubts about its usefulness. I don't think most of the scenarios are useful, and I still think so. Therefore, whether to merge or not is worth discussing.
"You are absolutely right. I just mentioned my idea here, but I am not a decision-maker. If dependencies are added to the project, it can become more troublesome very quickly. I am sharing my past experience. A database would be good for this purpose, but in Kubernetes, you can handle it with a simple internal microservice with a Redis cluster. However, if you make them a requirement for that app, you will have to implement more and more adapters in a short amount of time."
那做成一个插件吧
@aiwillcoming 你说的就更复杂了,目前这个项目都没有插件系统这种东西。顶多有个选项加个开关
There is no perfect solution to this problem in the current architecture. My personal preference is to only provide optional sqlite as a local persistence alternative. Add an optional db path to the command line parameter. If passed, install sqlite's pip dependency.
Additionally, I've been wanting to create another project to achieve true production availability of the Fooocus API. Including multi-instance task scheduling, object storage, container and instance management and other functions.
If you are interested in the new project I described, we can have a more in-depth discussion, such as forming a group or something.
There is no perfect solution to this problem in the current architecture. My personal preference is to only provide optional sqlite as a local persistence alternative. Add an optional db path to the command line parameter. If passed, install sqlite's pip dependency.
Additionally, I've been wanting to create another project to achieve true production availability of the Fooocus API. Including multi-instance task scheduling, object storage, container and instance management and other functions.
A good compromise. I will close this pr and do some change
sqlite 是python内置的
sqlite 是python内置的
神奇的语言。
support sqlite3 mysql8 and redis a new interface to query those data