Skip to content

Instantly share code, notes, and snippets.

@avtar
Created October 17, 2017 21:56
Show Gist options
  • Save avtar/83758d389c3d8179b3272357fdcd1995 to your computer and use it in GitHub Desktop.
Save avtar/83758d389c3d8179b3272357fdcd1995 to your computer and use it in GitHub Desktop.
1. Create a base grade that contains all shared invokers and other parts for the processing of 3 endpoints;
2. the function gpii.qi.api.ci.results() might be refactored to use event listeners with priorities
component member options:
fluid.defaults("test", {
regularOption1: "a"
members: {
memberOption1: "m",
},
events: {
onProcess: null
},
listeners: {
"onProcess.verifyURL": {
priority: "first",
...
},
"onProcess.respond": {
funcName: "readFile",
priority: "after:verifyURL"
}
},
// in case to override one listener:
distributeOptions: {
"distributeOnProcessRespond": {
record: "makeGithubCall",
target: "{that}.options.listeners.onProcess.respond"
}
}
});
that.output1 = output1; // output1 will live in members {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment