Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / screenRecording / screenRecording.rpc.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x42ef=['ScreenRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','jayson/promise','client','http','request','info','ScreenRecording,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x26af5d,_0x26e33d){var _0x5ee59b=function(_0x531cd3){while(--_0x531cd3){_0x26af5d['push'](_0x26af5d['shift']());}};_0x5ee59b(++_0x26e33d);}(_0x42ef,0x98));var _0xf42e=function(_0x33398a,_0x100006){_0x33398a=_0x33398a-0x0;var _0x782593=_0x42ef[_0x33398a];return _0x782593;};'use strict';var _=require(_0xf42e('0x0'));var util=require(_0xf42e('0x1'));var moment=require(_0xf42e('0x2'));var BPromise=require(_0xf42e('0x3'));var rs=require(_0xf42e('0x4'));var fs=require('fs');var Redis=require(_0xf42e('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xf42e('0x6'));var logger=require(_0xf42e('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xf42e('0x8'));var client=jayson[_0xf42e('0x9')][_0xf42e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x58ccd5,_0x2f5359,_0x599487){return new BPromise(function(_0x3b9665,_0x361e2d){return client[_0xf42e('0xb')](_0x58ccd5,_0x599487)['then'](function(_0x12cb38){logger[_0xf42e('0xc')](_0xf42e('0xd'),_0x2f5359,_0xf42e('0xe'));logger[_0xf42e('0xf')](_0xf42e('0x10'),_0x2f5359,_0xf42e('0xe'),JSON[_0xf42e('0x11')](_0x12cb38));if(_0x12cb38[_0xf42e('0x12')]){if(_0x12cb38['error'][_0xf42e('0x13')]===0x1f4){logger[_0xf42e('0x12')](_0xf42e('0xd'),_0x2f5359,_0x12cb38[_0xf42e('0x12')][_0xf42e('0x14')]);return _0x361e2d(_0x12cb38[_0xf42e('0x12')][_0xf42e('0x14')]);}logger[_0xf42e('0x12')](_0xf42e('0xd'),_0x2f5359,_0x12cb38[_0xf42e('0x12')][_0xf42e('0x14')]);return _0x3b9665(_0x12cb38[_0xf42e('0x12')][_0xf42e('0x14')]);}else{logger['info'](_0xf42e('0xd'),_0x2f5359,_0xf42e('0xe'));_0x3b9665(_0x12cb38['result'][_0xf42e('0x14')]);}})['catch'](function(_0x46f814){logger[_0xf42e('0x12')](_0xf42e('0xd'),_0x2f5359,_0x46f814);_0x361e2d(_0x46f814);});});}