Skip to content

Commit cf7738e

Browse files
CS-57: Fix threading for TSC and fix CI for bionic nodejs version incompatibility (#421)
* CS-57: Fix threading for TSC and fix CI for bionic nodejs version imcompatibility * Updates
1 parent a3fbec0 commit cf7738e

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

.github/workflows/feature_branch.yml

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: feature_branch
22
on:
33
pull_request:
44
types: [opened, synchronize, reopened]
5+
# make GHA actions use node16 which still works with bionic
6+
# See https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
7+
# Unclear how long this will work though. Remove after rebase carma-streets to newer Ubuntu release
8+
env:
9+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
510
jobs:
611
build:
712
defaults:

.github/workflows/master.yml

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: master
22
on:
33
push:
44
branches: [master]
5+
# make GHA actions use node16 which still works with bionic
6+
# See https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
7+
# Unclear how long this will work though. Remove after rebase carma-streets to newer Ubuntu release
8+
env:
9+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
510
jobs:
611
docker-build:
712
strategy:

.github/workflows/release.yml

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ on:
33
push:
44
tags:
55
- "carma-system-*"
6+
# make GHA actions use node16 which still works with bionic
7+
# See https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
8+
# Unclear how long this will work though. Remove after rebase carma-streets to newer Ubuntu release
9+
env:
10+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
611
jobs:
712
docker-build:
813
strategy:

tsc_client_service/src/tsc_service.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ namespace traffic_signal_controller_service {
389389
// Log command info sent
390390
SPDLOG_INFO(command_to_execute.get_cmd_info());
391391
if ( enable_snmp_cmd_logging_ ){
392-
if(auto logger = spdlog::get("snmp_cmd_logger"); logger != nullptr ){
392+
if(auto logger = spdlog::get(SNMP_COMMAND_LOGGER_NAME); logger != nullptr ){
393393
logger->info( command_to_execute.get_cmd_info());
394394
}
395395
}
@@ -453,11 +453,13 @@ namespace traffic_signal_controller_service {
453453
std::thread spat_t(&tsc_service::produce_spat_json, this);
454454

455455
if ( spat_proj_mode == SPAT_PROJECTION_MODE::DPP_PROJECTION ) {
456+
// Run thread to consume dpp
456457
std::thread desired_phase_plan_t(&tsc_service::consume_desired_phase_plan, this);
457-
SPDLOG_DEBUG("Thread joined to consume desired phase plan generated by carma-streets SO service.");
458-
desired_phase_plan_t.join();
458+
SPDLOG_DEBUG("Thread joined to consume desired phase plan generated by carma-streets SO service and send SNMP commands");
459459
// Run tsc control phases
460460
std::thread control_phases_t(&tsc_service::control_tsc_phases, this);
461+
462+
desired_phase_plan_t.join();
461463
control_phases_t.join();
462464
}
463465
// TODO: Remove if no longer necessary for TM/TSP MMITSS Integration

0 commit comments

Comments
 (0)