Plugin hooks (#1452)

* Refactor session and plugin code
* Add context to job tasks
* Show hooks in plugins page
* Refactor session management
This commit is contained in:
WithoutPants
2021-06-11 17:24:58 +10:00
committed by GitHub
parent dde361f9f3
commit 46bbede9a0
48 changed files with 1289 additions and 338 deletions

View File

@@ -70,12 +70,10 @@ func (t *rpcPluginTask) Start() error {
Client: t.client,
}
input := t.buildPluginInput()
t.done = make(chan *rpc.Call, 1)
result := common.PluginOutput{}
t.waitGroup.Add(1)
iface.RunAsync(input, &result, t.done)
iface.RunAsync(t.input, &result, t.done)
go t.waitToFinish(&result)
t.started = true