(ctx)
| 9104 | this.queueLast = queueLast; |
| 9105 | } |
| 9106 | execute(ctx) { |
| 9107 | const onFeature = this; |
| 9108 | const every = this.every; |
| 9109 | const queueNone = this.queueNone; |
| 9110 | const queueFirst = this.queueFirst; |
| 9111 | const queueLast = this.queueLast; |
| 9112 | const start = this.start; |
| 9113 | let eventQueueInfo = ctx.meta.runtime.getEventQueueFor(ctx.me, onFeature); |
| 9114 | if (eventQueueInfo.executing && every === false) { |
| 9115 | if (queueNone || queueFirst && eventQueueInfo.queue.length > 0) { |
| 9116 | return; |
| 9117 | } |
| 9118 | if (queueLast) { |
| 9119 | eventQueueInfo.queue.length = 0; |
| 9120 | } |
| 9121 | eventQueueInfo.queue.push(ctx); |
| 9122 | return; |
| 9123 | } |
| 9124 | eventQueueInfo.executing = true; |
| 9125 | ctx.meta.onHalt = function() { |
| 9126 | eventQueueInfo.executing = false; |
| 9127 | var queued = eventQueueInfo.queue.shift(); |
| 9128 | if (queued) { |
| 9129 | setTimeout(function() { |
| 9130 | onFeature.execute(queued); |
| 9131 | }, 1); |
| 9132 | } |
| 9133 | }; |
| 9134 | ctx.meta.reject = function(err) { |
| 9135 | console.error(err.message ? err.message : err); |
| 9136 | console.error(err.stack); |
| 9137 | var hypertrace = ctx.meta.runtime.getHyperTrace(ctx, err); |
| 9138 | if (hypertrace) { |
| 9139 | hypertrace.print(); |
| 9140 | } |
| 9141 | ctx.meta.runtime.triggerEvent(ctx.me, "exception", { |
| 9142 | error: err |
| 9143 | }); |
| 9144 | }; |
| 9145 | start.execute(ctx); |
| 9146 | } |
| 9147 | install(elt, source, args, runtime2) { |
| 9148 | const onFeature = this; |
| 9149 | const displayName = this.displayName; |
nothing calls this directly
no test coverage detected