Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement to process_container.py #5902

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions st2reactor/st2reactor/container/process_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,18 @@ def _poll_sensors_for_results(self, sensor_ids):
# Sensor has been successfully running more than threshold seconds, clear the
# respawn counter so we can try to restart the sensor if it dies later on
self._sensor_respawn_counts[sensor_id] = 0
if now - sensor_start_time >= cfg.CONF.auth.service_token_ttl:
sensor = self._sensors[sensor_id]
self._delete_sensor(sensor_id)
self._dispatch_trigger_for_sensor_exit(sensor, exit_code=status)
concurrency.spawn(
self._respawn_sensor,
sensor_id=sensor_id,
sensor=sensor,
exit_code=status,
)



def running(self):
return len(self._processes)
Expand Down
Loading