1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x458c=['finished\x20populating','contacts1','CmHopper','log','hopper1','hopper2','catch','Innocenzo','Biondo','innocenzo.biondo','@xcally.com','now','push','CmContact','destroy','then','bulkCreate'];(function(_0x10156c,_0x4225e3){var _0x413b57=function(_0x4d38b5){while(--_0x4d38b5){_0x10156c['push'](_0x10156c['shift']());}};_0x413b57(++_0x4225e3);}(_0x458c,0x139));var _0xc458=function(_0x22b8a3,_0x2a79a7){_0x22b8a3=_0x22b8a3-0x0;var _0x199a0c=_0x458c[_0x22b8a3];return _0x199a0c;};'use strict';var util=require('util');var db=require('../mysqldb')['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts['push']({'id':i,'firstName':_0xc458('0x0')+i,'lastName':_0xc458('0x1')+i,'phone':0xf879fb460+i,'email':_0xc458('0x2')+i+_0xc458('0x3')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper['push']({'id':i,'active':![],'scheduledat':Date[_0xc458('0x4')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0xc458('0x4')](),'updatedAt':Date[_0xc458('0x4')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0xc458('0x5')]({'id':i,'firstName':_0xc458('0x0')+i,'lastName':_0xc458('0x1')+i,'phone':0xf879fb460+i,'email':_0xc458('0x2')+i+'@xcally.com'});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2['push']({'id':i,'active':![],'scheduledat':Date['now'](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0xc458('0x4')](),'updatedAt':Date['now']()});}db[_0xc458('0x6')][_0xc458('0x7')]({'where':{}})[_0xc458('0x8')](function(){return db[_0xc458('0x6')][_0xc458('0x9')](contacts);})['then'](function(){console['log'](_0xc458('0xa'),_0xc458('0xb'));return db[_0xc458('0xc')][_0xc458('0x7')]({'where':{}});})[_0xc458('0x8')](function(){return db[_0xc458('0xc')][_0xc458('0x9')](hopper);})[_0xc458('0x8')](function(){console[_0xc458('0xd')](_0xc458('0xa'),_0xc458('0xe'));return db[_0xc458('0x6')][_0xc458('0x9')](contacts2);})[_0xc458('0x8')](function(){console[_0xc458('0xd')](_0xc458('0xa'),'contacts2');return db[_0xc458('0xc')][_0xc458('0x9')](hopper2);})[_0xc458('0x8')](function(){console[_0xc458('0xd')]('finished\x20populating',_0xc458('0xf'));})[_0xc458('0x10')](function(_0x38712a){console[_0xc458('0xd')](_0x38712a);});