()
| 99 | } |
| 100 | |
| 101 | getMetrics() { |
| 102 | const pendingTasks = this.store.countPending({ direction: 'inbound' }); |
| 103 | return { |
| 104 | subscribed: this.subscribed, |
| 105 | tasks_received: this._stats.tasks_received, |
| 106 | tasks_claimed: this._stats.tasks_claimed, |
| 107 | tasks_completed: this._stats.tasks_completed, |
| 108 | tasks_failed: this._stats.tasks_failed, |
| 109 | tasks_pending: pendingTasks, |
| 110 | last_claim_at: this._stats.last_claim_at, |
| 111 | last_complete_at: this._stats.last_complete_at, |
| 112 | avg_completion_ms: this._stats.avg_completion_ms, |
| 113 | }; |
| 114 | } |
| 115 | |
| 116 | getHeartbeatMeta() { |
| 117 | const pendingTasks = this.store.countPending({ direction: 'inbound' }); |
no test coverage detected