-
Notifications
You must be signed in to change notification settings - Fork 119
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
[NEW] Add a bridge to the ITimers interface #439
base: alpha
Are you sure you want to change the base?
Conversation
Hey @cybem! Thank you for taking the time to make this PR :) One thing that's not clear to me based on the implementation is how you intend to use this new bridge in the app. Can you provide an example? I'm guessing it might have something to do with functions like |
Hello, Douglas @d-gubert! We use it in that manner:
But we can adapt source code of our app to more elegant solution of the bridge. Thank you for your feedback! |
We're considering allowing access to the functions directly via global scope, much like how you'd have in a pure NodeJS environment. I think it would solve your use case as well, right? Usually we create bridges for apps to access resources that are directly related to Rocket.Chat, such as data entities like messages and rooms; or features that are tightly coupled to the database, like the persistence layer or scheduler. These functions from the What do you think? |
Hello Douglas @d-gubert, Yes, sure. It would be nice. Thank you! |
I'll be closing this PR as the latest Apps-Engine has those functions available globally. Thanks for contributing the idea :) |
Hello, @d-gubert
But here https://github.com/RocketChat/Rocket.Chat.Apps-engine/blob/eaec68e8179255d81364c88ab68cacbd3f120c87/src/server/compiler/modules/index.ts it not used! So, looks like a regression critical for us. Can you check that? Thank you! |
What? ⛵
This pull request contains an implementation of the bridge to the ITimers interface.
Why? 🤔
The ITimers interface is very useful to implement custom protocols, circuit breakers, throttlers, complex actions and so on.