Skip to content

Commit

Permalink
reduce max time without updates before the agent is marked offline
Browse files Browse the repository at this point in the history
  • Loading branch information
cviolbarbosa committed Mar 18, 2024
1 parent 9bb6bbd commit c0e1198
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions helyos_server/src/initialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const microserviceWatcher = require('./event_handlers/microservice_event_watcher
const fs = require('fs');
const readYML = require('./modules/read_config_yml.js');

const MAX_TIME_WITHOUT_UPDATE = 20;
const AGENT_IDLE_TIME_OFFLINE = process.env.AGENT_IDLE_TIME_OFFLINE || 10;
const CREATE_RBMQ_ACCOUNTS = process.env.CREATE_RBMQ_ACCOUNTS || "True";
const { AGENTS_UL_EXCHANGE, AGENTS_DL_EXCHANGE, ANONYMOUS_EXCHANGE, AGENT_MQTT_EXCHANGE } = require('./services/message_broker/rabbitMQ_services.js');
const { CHECK_IN_QUEUE, AGENT_MISSION_QUEUE,AGENT_VISUALIZATION_QUEUE, AGENT_UPDATE_QUEUE,
Expand All @@ -25,7 +25,7 @@ HELYOS_REPLICA = HELYOS_REPLICA === 'True';


const initWatchers = () => {
agentComm.watchWhoIsOnline(MAX_TIME_WITHOUT_UPDATE);
agentComm.watchWhoIsOnline(AGENT_IDLE_TIME_OFFLINE);
microserviceWatcher.initWatcher();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var databaseServices = require('../../services/database/database_services.js');
const { saveLogData } = require('../systemlog.js');
const MESSAGE_VERSION = rabbitMQServices.MESSAGE_VERSION
const BACKWARD_COMPATIBILITY = (process.env.BACKWARD_COMPATIBILITY || 'false') === 'true';
const REFRESH_ONLNE_TIME_PERIOD = 10;
const REFRESH_ONLNE_TIME_PERIOD = 5;

let POSITION_MARGIN;
if (process.env.POSITION_MARGIN)
Expand Down

0 comments on commit c0e1198

Please sign in to comment.