summaryrefslogtreecommitdiff
path: root/app/client/modules/morph/morph.tasks.js
blob: 67abc8afe904f87afec1a34627b1a7d888a953df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import uuidv1 from 'uuid/v1'

import socket from '../../socket'
import types from '../../types'

import actions from '../../actions'

import module from './morph.module'

export const fetch_task = (url, file_id, dataset) => dispatch => {
  if (! url) return console.log('input file inaccessible (no url)')
  const task = {
    module: module.name,
    activity: 'fetch',
    dataset: dataset,
    opt: {
      url,
      file_id,
      dataset,
    }
  }
  return actions.queue.add_task(task)
}