tao-test/app/ltiDeliveryProvider/views/js/loader/ltiDeliveryProvider.min.js

2 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-08-29 20:14:13 +02:00
define("ltiDeliveryProvider/controller/DeliveryTool/launchQueue",["lodash","module","core/polling","core/request"],function(_,module,polling,request){'use strict';var _defaultConfig={relaunchInterval:30};return{start:function start(){var _module$config=module.config(),_module$config$relaun=_module$config.relaunchConfig,relaunchConfig=void 0===_module$config$relaun?{}:_module$config$relaun,_$defaults=_.defaults(relaunchConfig,_defaultConfig),capacityCheckUrl=_$defaults.capacityCheckUrl,relaunchInterval=_$defaults.relaunchInterval,runUrl=_$defaults.runUrl;polling({action:function action(){var async=this.async();request({url:capacityCheckUrl,method:"GET",dataType:"json",noToken:!0}).then(function(_ref){var status=_ref.status;1==status?(async.reject(),window.location=runUrl):async.resolve()}).catch(function(){async.resolve()})},interval:1e3*relaunchInterval,autoStart:!0})}}}),define("ltiDeliveryProvider/controller/routes",{DeliveryTool:{actions:{launchQueue:"controller/DeliveryTool/launchQueue"}}}),define("ltiDeliveryProvider/loader/ltiDeliveryProvider.bundle",function(){});
//# sourceMappingURL=ltiDeliveryProvider.min.js.map