Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1109 from marcin-krolik/kromar-enhanced-view
Browse files Browse the repository at this point in the history
Simplified interaction between scheduler and control
  • Loading branch information
IRCody authored Aug 17, 2016
2 parents 9bdc75e + 63211ac commit 367020b
Show file tree
Hide file tree
Showing 44 changed files with 3,021 additions and 1,691 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ Documentation for Snap will be kept in this repository for now with an emphasis
* [build and test](docs/BUILD_AND_TEST.md)
* [REST API](docs/REST_API.md)
* [tasks](docs/TASKS.md)
* [plugin life cycle](docs/PLUGIN_LIFECYCLE.md)
* [plugin signing](docs/PLUGIN_SIGNING.md)
* [tribe](docs/TRIBE.md)

Expand Down
3 changes: 3 additions & 0 deletions control/available_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const (
var (
ErrPoolNotFound = errors.New("plugin pool not found")
ErrBadKey = errors.New("bad key")
ErrBadTaskId = errors.New("bad task id")
)

// availablePlugin represents a plugin which is
Expand Down Expand Up @@ -538,6 +539,8 @@ func (ap *availablePlugins) findLatestPool(pType, name string) (strategy.Pool, s
}

func (ap *availablePlugins) getOrCreatePool(key string) (strategy.Pool, error) {
ap.Lock()
defer ap.Unlock()
var err error
pool, ok := ap.table[key]
if ok {
Expand Down
1 change: 1 addition & 0 deletions control/available_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func TestAvailablePlugin(t *testing.T) {
Convey("Stop()", t, func() {
Convey("returns nil if plugin successfully stopped", func() {
r := newRunner()
r.SetEmitter(new(MockEmitter))
a := plugin.Arg{
PluginLogPath: "/tmp/snap-test-plugin-stop.log",
}
Expand Down
Loading

0 comments on commit 367020b

Please sign in to comment.