You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be easier to work with if templates were loaded from a separate (JSON ?) file. My templates are a few dozen of Mb, so I would prefer to not have them in the git history.
I tried to make a JSON file and use an ajax request, but first it is not clear to me how to adapt the code to use an asynchronous ajax request, and second how it could work also with the node cli interface.
Any idea on a good way to do this ?
The text was updated successfully, but these errors were encountered:
This is definitely an interesting problem. If you want to use ajax, you'd want the master template manager to request the templates, and then pass them down to the workers so that you don't pull down the same file multiple times.
Notice that in the file workerMethods, we transmit template information, but only data.inactiveTemplates. One could also - in the first request, transmit the actual templates themselves, and have the template manager then process the templates.
Or better than that, create a third message type which the templatesService uses to pass templates to the workers. That is, in templatesService (services.js file, line 946), use the angular request library to request the templates. You could then set the templates in the templateManager and invoke setOriginalTemplates.
I'll give it some more thought and see if there is a more elegant way, but I think the above method should work.
Interesting, I didn't think about the workers as I am not familiar with this Javascript feature ;), but I see what you mean. This is not a high priority but it would be more convenient to handle templates.
It would be easier to work with if templates were loaded from a separate (JSON ?) file. My templates are a few dozen of Mb, so I would prefer to not have them in the git history.
I tried to make a JSON file and use an ajax request, but first it is not clear to me how to adapt the code to use an asynchronous ajax request, and second how it could work also with the node cli interface.
Any idea on a good way to do this ?
The text was updated successfully, but these errors were encountered: