From 83d90165ee334bed2e016d2361d97d582879aa34 Mon Sep 17 00:00:00 2001 From: James Greenaway Date: Tue, 29 Jan 2019 12:03:10 +0000 Subject: [PATCH] Format demo code --- src/index.tsx | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 5ad976d..afdbd59 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -29,18 +29,26 @@ store.dispatch(WorkloadActions.updateStatus({ id: 0, status: 'SUCCESS' })); const workloadService = new WorkloadService(); -workloadService.create({ complexity: 1 }).then(console.log.bind(console, 'create 0')); -workloadService.cancel({ id: 0 }).then(console.log.bind(console, 'cancel 0')); -setTimeout(() => workloadService.checkStatus({ id: 0 }).then(console.log.bind(console, 'checkStatus 0')), 100) +workloadService.create({ complexity: 1 }) + .then(console.log.bind(console, 'create 0')); +workloadService.cancel({ id: 0 }) + .then(console.log.bind(console, 'cancel 0')); +setTimeout(() => workloadService.checkStatus({ id: 0 }) + .then(console.log.bind(console, 'checkStatus 0')), 100); -workloadService.create({ complexity: 2 }).then(console.log.bind(console, 'create 1')); -workloadService.checkStatus({ id: 1 }).then(console.log.bind(console, 'checkStatus 1')); -setTimeout(() => workloadService.checkStatus({ id: 1 }).then(console.log.bind(console, 'checkStatus 1')), 200) - -workloadService.create({ complexity: 2 }).then(console.log.bind(console, 'create 2')); -workloadService.checkStatus({ id: 2 }).then(console.log.bind(console, 'checkStatus 2')); -setTimeout(() => workloadService.checkStatus({ id: 2 }).then(console.log.bind(console, 'checkStatus 2')), 200) +workloadService.create({ complexity: 2 }) + .then(console.log.bind(console, 'create 1')); +workloadService.checkStatus({ id: 1 }) + .then(console.log.bind(console, 'checkStatus 1')); +setTimeout(() => workloadService.checkStatus({ id: 1 }) + .then(console.log.bind(console, 'checkStatus 1')), 200); +workloadService.create({ complexity: 2 }) + .then(console.log.bind(console, 'create 2')); +workloadService.checkStatus({ id: 2 }) + .then(console.log.bind(console, 'checkStatus 2')); +setTimeout(() => workloadService.checkStatus({ id: 2 }) + .then(console.log.bind(console, 'checkStatus 2')), 200); ReactDOM.render(