Replies: 4 comments
-
What problem would you be solving with handlers for these events? Cancelation, notification, mutation? I do not see a problem with implementing this. Please not though, this importer is for records only. And we desperately need ability to import any type of resource. Record importer already uses |
Beta Was this translation helpful? Give feedback.
-
Notification+Mutation. It's essentially a workaround to the fact that standard record events aren't fired on import.
We can set a sane default like the one used in web-compose for polling And expose a config variable to allow for power users to set a different value.
Sorry, I don't understand, you do or don't want this implimented? Or did you mean don't add via the importer interface, but rather through the envoy interface in order to plan for the future? |
Beta Was this translation helpful? Give feedback.
-
@darh , Any thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
Sure, go for it. |
Beta Was this translation helpful? Give feedback.
-
Hey, I saw that there's some interest in triggers for import events.
This is the related forum.
I was curious if there's any interest on the corteza side of outside contribution, and if so, if this is viewed as a reasonable first issue.
After a few minutes of browsing the source code my first stab would be to add a couple events here that correspond to the
ImportInit
,ImportInit
, andImportRun
functions (or make a new grouping in this file)https://github.com/cortezaproject/corteza-server/blob/57721291b270d4ed9b9e625d7a17fca2cc6c27eb/system/service/event/events.yaml#L101-L111
And then call the events using
Service.eventbus.WaitFor
like we do herehttps://github.com/cortezaproject/corteza-server/blob/57721291b270d4ed9b9e625d7a17fca2cc6c27eb/system/service/application.go#L158-L161
The relevant functions I found after a glance were these:
https://github.com/cortezaproject/corteza-server/blob/57721291b270d4ed9b9e625d7a17fca2cc6c27eb/compose/rest/record.go#L319
https://github.com/cortezaproject/corteza-server/blob/57721291b270d4ed9b9e625d7a17fca2cc6c27eb/compose/rest/record.go#L428
https://github.com/cortezaproject/corteza-server/blob/57721291b270d4ed9b9e625d7a17fca2cc6c27eb/compose/rest/record.go#L302
I'm sure there's more involved. Please let me know whether or not there's any interest and if so if this is the right direction.
Beta Was this translation helpful? Give feedback.
All reactions