<commit_before>import { bindActionCreators } from 'redux';
import ReduxWebSocketService from '../websocket/ReduxWebSocketService'
import { setHosts } from '../hosts/HostActions';
const url = 'ws://localhost:5120/poll/';

export default function startup(dispatch) {
    new ReduxWebSocketService(url, 'hosts', dispatch)
        .onOpened(({ws, id}) => {
            ws.send(JSON.stringify({
                id,
                metricKey: '/hosts',
                start: new Date(new Date - 3*3600*1000).getTime(),
                step: 10000,
                minSteps: 10,
                tags: []
            }));
        })
        .onMsg(({msg}) => dispatch(setHosts(msg.data)))
        .open();

}<commit_msg>use the new send method in startup<commit_after>import { bindActionCreators } from 'redux';
import ReduxWebSocketService from '../websocket/ReduxWebSocketService'
import { setHosts } from '../hosts/HostActions';
import createUuid from '../util/uuid';
const url = 'ws://localhost:5120/poll/';

export default function startup(dispatch) {
    new ReduxWebSocketService(url, 'hosts', dispatch)
        .send({
          id: createUuid(),
          metricKey: '/hosts',
          start: new Date(new Date - 3*3600*1000).getTime(),
          step: 10000,
          minSteps: 10,
          tags: []
        })
        .onMsg(({msg}) => dispatch(setHosts(msg.data)))
        .open();

}
{'fraction_non_alphanumeric': 0.14655172413793102, 'fraction_numerical': 0.028735632183908046, 'mean_word_length': 2.34052757793765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4592754', 'n_tokens_mistral': 449, 'n_tokens_neox': 403, 'n_words': 93}