appback-remoteagent 0.13.18 → 0.13.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +5 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -161,7 +161,11 @@ async function startManualPollingScheduler(bots) {
161
161
  }
162
162
  while (true) {
163
163
  const now = Date.now();
164
+ let activePolls = [...runtimeStates.values()].filter((state) => state.inFlight).length;
164
165
  for (const bot of pollingBots) {
166
+ if (activePolls >= config.telegramPollingMaxConcurrency) {
167
+ break;
168
+ }
165
169
  const botId = String(bot.botInfo.id);
166
170
  const runtime = runtimeStates.get(botId);
167
171
  if (!runtime || runtime.inFlight) {
@@ -177,6 +181,7 @@ async function startManualPollingScheduler(bots) {
177
181
  continue;
178
182
  }
179
183
  runtime.inFlight = true;
184
+ activePolls += 1;
180
185
  void pollTelegramBot(bot, runtime, {
181
186
  isMain,
182
187
  totalBots: pollingBots.length,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appback-remoteagent",
3
- "version": "0.13.18",
3
+ "version": "0.13.19",
4
4
  "description": "Personal installable session server for continuing local AI work across PC and Telegram",
5
5
  "license": "MIT",
6
6
  "type": "module",