Closed kmgraves closed 2 years ago
Logger.info
messages should come out in the CmdTlmServer messages window. A typical microservice would like like so:
require 'cosmos/microservices/microservice'
require 'cosmos/utilities/logger'
module Cosmos
class MyMicroservice < Microservice
def run()
Logger.level = Logger::INFO
Thread.abort_on_exception = true
while true
# Do stuff!
sleep 1
end
end
end
end
Cosmos::MyMicroservice.run() if __FILE__ == $0
As far as your cleanup microservice crashing I think it's due to #1624 which changed how that was implemented. You probably need to update to latest or our last release.
I am trying to convert some background tasks to microservices to convert a plugin from Cosmos4 to Cosmos5
My microservices appear to be passing syntax checks and being initialized, but I cannot see them running. I attempted to add debug messages (Using Logger.info) but none are being displayed in the cosmos5 web interface log messages in the cmdtlmserver.
The "TEST TEST TEST" message is from plugin_microservice.rb
My main concern is I have noticed that the cleanup_microservice.rb is constantly crashing. Would this error cause all microservices to crash as well?