Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

清理历史宏定义问题 #209

Open
libai-m2 opened this issue Sep 14, 2022 · 4 comments
Open

清理历史宏定义问题 #209

libai-m2 opened this issue Sep 14, 2022 · 4 comments

Comments

@libai-m2
Copy link

问题背景:应用中需要将ExpressRunner定义的历史macro清理掉,查看了源代码,runner下的loader属性是私有的,外层无法调用clear方法去清除macro。请问有什么方法能清理macro么?

@DQinYuan
Copy link
Collaborator

清除宏定义的业务背景是什么?

@libai-m2
Copy link
Author

libai-m2 commented Sep 14, 2022 via email

@DQinYuan
Copy link
Collaborator

其实你想要的是多租户的功能,是吗?目前 QLExpress 没有这个能力,如果单例做可能会有并发问题,每次都创建新的实例也会有性能风险。我们目前在开发新的版本,可能会考虑多租户的功能,有兴趣的话可以微信交流下,微信号可以发我邮箱 qinyuan.dqy@alibaba-inc.com

@DQinYuan
Copy link
Collaborator

推荐一个方案:使用单例的 ExpressRunner,然后在宏内部根据 context 中的一个变量进行逻辑分发,然后不同租户调用 execute 之前,将自己的租户标识写到 context 中

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants