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 Pascal Precht
parent 048fa93caf
commit 9c25895c54
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
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 FETCH_PROCESS_LOGS = 'FETCH_PROCESS_LOGS';
export const RECEIVE_PROCESS_LOGS = 'RECEIVE_PROCESS_LOGS'; export const RECEIVE_PROCESS_LOGS = 'RECEIVE_PROCESS_LOGS';
export const WATCH_NEW_PROCESS_LOGS = 'WATCH_NEW_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_NEW_PROCESS_LOG = 'RECEIVE_NEW_PROCESS_LOG';
export const RECEIVE_PROCESS_LOGS_ERROR = 'RECEIVE_PROCESS_LOGS_ERROR'; export const RECEIVE_PROCESS_LOGS_ERROR = 'RECEIVE_PROCESS_LOGS_ERROR';
// Blocks // Blocks

View File

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

View File

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