Method: Cosmos::ReactionModel#create_microservice

Defined in:
lib/cosmos/models/reaction_model.rb

#create_microservice(topics:) ⇒ Object



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/cosmos/models/reaction_model.rb', line 292

def create_microservice(topics:)
  # reaction Microservice
  microservice = MicroserviceModel.new(
    name: @microservice_name,
    folder_name: nil,
    cmd: ['ruby', 'reaction_microservice.rb', @microservice_name],
    work_dir: '/cosmos/lib/cosmos/microservices',
    options: [],
    topics: topics,
    target_names: [],
    plugin: nil,
    scope: @scope
  )
  microservice.create
end