remove isListening action and just use the watch one

This commit is contained in:
Jonathan Rainville 2018-08-03 11:38:44 -04:00 committed by Iuri Matias
parent 2f2a48bd41
commit abe3aa4a80
3 changed files with 2 additions and 4 deletions

View File

@ -10,7 +10,6 @@ export const RECEIVE_PROCESSES_ERROR = 'RECEIVE_PROCESSES_ERROR';
export const FETCH_PROCESS_LOGS = 'FETCH_PROCESS_LOGS';
export const RECEIVE_PROCESS_LOGS = 'RECEIVE_PROCESS_LOGS';
export const WATCH_NEW_PROCESS_LOGS = 'WATCH_NEW_PROCESS_LOGS';
export const IS_LISTENING_PROCESS_LOG = 'IS_LISTENING_PROCESS_LOG';
export const RECEIVE_NEW_PROCESS_LOG = 'RECEIVE_NEW_PROCESS_LOG';
export const RECEIVE_PROCESS_LOGS_ERROR = 'RECEIVE_PROCESS_LOGS_ERROR';
// Blocks

View File

@ -4,7 +4,7 @@ import {
RECEIVE_PROCESS_LOGS,
RECEIVE_PROCESS_LOGS_ERROR,
RECEIVE_NEW_PROCESS_LOG,
IS_LISTENING_PROCESS_LOG
WATCH_NEW_PROCESS_LOGS
} from "../actions";
export default function processes(state = {}, action) {
@ -38,7 +38,7 @@ export default function processes(state = {}, action) {
}
};
}
case IS_LISTENING_PROCESS_LOG: {
case WATCH_NEW_PROCESS_LOGS: {
return {
...state,
data: {

View File

@ -94,7 +94,6 @@ export function *watchInitBlockHeader() {
}
export function *listenToProcessLogs(action) {
yield put({type: actions.IS_LISTENING_PROCESS_LOG, processName: action.processName});
const socket = api.webSocketProcess(action.processName);
const channel = yield call(createChannel, socket);
while (true) {