worker: use default JetStream long-poll for consumer next
This commit is contained in:
parent
4d12c6913a
commit
1f13ecaed9
1 changed files with 1 additions and 2 deletions
|
|
@ -54,7 +54,6 @@ const WHISPER_CONSUMER_NAME = 'compute_whisper';
|
||||||
const LAYOUT_CONSUMER_NAME = 'compute_layout';
|
const LAYOUT_CONSUMER_NAME = 'compute_layout';
|
||||||
const COMPUTE_STATE_BUCKET = 'compute_state';
|
const COMPUTE_STATE_BUCKET = 'compute_state';
|
||||||
const COMPUTE_STATE_TTL_MS = 24 * 60 * 60 * 1000;
|
const COMPUTE_STATE_TTL_MS = 24 * 60 * 60 * 1000;
|
||||||
const PULL_EXPIRES_MS = 1000;
|
|
||||||
const LOOP_ERROR_BACKOFF_MS = 500;
|
const LOOP_ERROR_BACKOFF_MS = 500;
|
||||||
const SSE_POLL_INTERVAL_MS = 400;
|
const SSE_POLL_INTERVAL_MS = 400;
|
||||||
const RUNNING_HEARTBEAT_MS = 5000;
|
const RUNNING_HEARTBEAT_MS = 5000;
|
||||||
|
|
@ -1129,7 +1128,7 @@ async function main(): Promise<void> {
|
||||||
let msg: JsMsg | null = null;
|
let msg: JsMsg | null = null;
|
||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
msg = await input.consumer.next({ expires: PULL_EXPIRES_MS });
|
msg = await input.consumer.next();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (stopping) return;
|
if (stopping) return;
|
||||||
app.log.error({ error: toErrorMessage(error), worker: input.workerLabel }, 'worker pull failed');
|
app.log.error({ error: toErrorMessage(error), worker: input.workerLabel }, 'worker pull failed');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue