Skip to content

Commit

Permalink
Fix to mkMarketplace publish to nsq with its id.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kishorekumar Neelamegam committed Mar 28, 2017
1 parent 3ab5645 commit da528a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/base/MarketPlaces.scala
Original file line number Diff line number Diff line change
Expand Up @@ -335,17 +335,17 @@ object MarketPlaces extends ConcreteMarketPlaces {
}

private def atPub(email: String, wa: MarketPlaceResult): ValidationNel[Throwable, MarketPlaceResult] = {
models.base.Requests.createAndPub(email, RequestInput(email, wa.flavor, CATTYPE_MARKETPLACES, "", INITIALIZE_MARKETPLACE, LOCALSITE_MARKETPLACES).json)
models.base.Requests.createAndPub(email, RequestInput(email, wa.id, CATTYPE_MARKETPLACES, "", INITIALIZE_MARKETPLACE, LOCALSITE_MARKETPLACES).json)
wa.successNel[Throwable]
}

private def dePub(email: String, wa: MarketPlaceResult): ValidationNel[Throwable, MarketPlaceResult] = {
models.base.Requests.createAndPub(email, RequestInput(email, wa.flavor, CATTYPE_MARKETPLACES, "", DELETE_MARKETPLACE, LOCALSITE_MARKETPLACES).json)
models.base.Requests.createAndPub(email, RequestInput(email, wa.id, CATTYPE_MARKETPLACES, "", DELETE_MARKETPLACE, LOCALSITE_MARKETPLACES).json)
wa.successNel[Throwable]
}

private def upPub(email: String, wa: MarketPlaceResult): ValidationNel[Throwable, MarketPlaceResult] = {
models.base.Requests.createAndPub(email, RequestInput(email, wa.flavor, CATTYPE_MARKETPLACES, "", CREATE_MARKETPLACE, LOCALSITE_MARKETPLACES).json)
models.base.Requests.createAndPub(email, RequestInput(email, wa.id, CATTYPE_MARKETPLACES, "", CREATE_MARKETPLACE, LOCALSITE_MARKETPLACES).json)
wa.successNel[Throwable]
}

Expand Down
2 changes: 2 additions & 0 deletions db/1.5.2.cql
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ GRANT ALL PERMISSIONS ON KEYSPACE vertice TO vertadmin;

use vertice;

DROP TABLE flavors;

CREATE TABLE IF NOT EXISTS flavors (id text, name text, cpu text, ram text, disk text, regions list<text>, price list<text>, properties list<text>, status text, json_claz text, created_at timestamp, updated_at timestamp, PRIMARY KEY(name, id));

0 comments on commit da528a0

Please sign in to comment.