summaryrefslogtreecommitdiff
path: root/app/client/modules/biggan/biggan.tasks.js
blob: 2a4243974e1c8322df59da31d1b0facad1c801fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import uuidv1 from 'uuid/v1'

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

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

import module from './biggan.module'

export const invert_task = (folder_id, dataset) => dispatch => {
  const task = {
    module: module.name,
    activity: 'invert',
    dataset,
    opt: {
      folder_id: folder_id,
    }
  }
  console.log(task)
  return actions.queue.add_task(task)
}

export const live_task = (opt) => dispatch => {
  const task = {
    module: module.name,
    activity: 'live',
    dataset: 'biggan',
    opt
  }
  console.log('add live task')
  return actions.queue.add_task(task)
}