Skip to content

Commit

Permalink
use constant for completed states
Browse files Browse the repository at this point in the history
  • Loading branch information
guzzijones committed Sep 28, 2020
1 parent c04c8b2 commit b973f06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions st2stream/st2stream/controllers/v1/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import six

from st2common import log as logging
from st2common.constants import action as action_constants
from st2common.router import Response
from st2common.util.jsonify import json_encode
from st2common.stream.listener import get_listener
Expand Down Expand Up @@ -59,14 +60,13 @@ def get_all(self, end_execution_id=None, end_event=None,
events = events if events else DEFAULT_EVENTS_WHITELIST
action_refs = action_refs if action_refs else None
execution_ids = execution_ids if execution_ids else None
end_statuses = ["failed", "succeeded"]

def make_response():
listener = get_listener(name='stream')
app_iter = format(listener.generator(events=events,
action_refs=action_refs,
end_event=end_event,
end_statuses=end_statuses,
end_statuses=action_constants.LIVE_ACTION_COMPLETED_STATES,
end_execution_id=end_execution_id,
execution_ids=execution_ids))
res = Response(headerlist=[("X-Accel-Buffering", "no"),
Expand Down

0 comments on commit b973f06

Please sign in to comment.