Class: Cosmos::PluginMicroservice
- Inherits:
-
Microservice
- Object
- Microservice
- Cosmos::PluginMicroservice
- Defined in:
- lib/cosmos/microservices/plugin_microservice.rb
Instance Attribute Summary
Attributes inherited from Microservice
#count, #custom, #error, #microservice_status_thread, #name, #scope, #state
Instance Method Summary collapse
-
#initialize(name) ⇒ PluginMicroservice
constructor
A new instance of PluginMicroservice.
- #run ⇒ Object
Methods inherited from Microservice
Constructor Details
#initialize(name) ⇒ PluginMicroservice
Returns a new instance of PluginMicroservice.
26 27 28 |
# File 'lib/cosmos/microservices/plugin_microservice.rb', line 26 def initialize(name) super(name, is_plugin: true) end |
Instance Method Details
#run ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/cosmos/microservices/plugin_microservice.rb', line 30 def run Dir.chdir @work_dir # Fortify: Process Control # This is dangerous! However, plugins need to be able to run whatever they want. # Only admins can install plugins and they need to be vetted for content. # NOTE: In COSMOS EE each microservice gets its own container so the potential # footprint is much smaller. In OpenSource COSMOS you're in the same container # as all the other plugins. exec(*@config["cmd"]) end |