yajsapi - Java Script high-level API
Yagna Contributor Guide

Class: SmartQueue

yajsapi / Exports / executor/smartq / SmartQueue

Class: SmartQueue

executor/smartq.SmartQueue

Type parameters

Name

Item

Hierarchy

  • SmartQueue

Table of contents

Constructors

Properties

Methods

Constructors

constructor

  • new SmartQueue(items: Item[], retry_cnt?: number, ...rest: any[]): SmartQueue

Type parameters:

Name

Item

Parameters:

Name

Type

Default value

items

Item[]

-

retry_cnt

number

2

...rest

any[]

-

Returns: SmartQueue

Defined in: yajsapi/executor/smartq.ts:38

Properties

__done

Private __done: any

Defined in: yajsapi/executor/smartq.ts:38

__eof

Private __eof: any

Defined in: yajsapi/executor/smartq.ts:37

__new_items

Private __new_items: any

Defined in: yajsapi/executor/smartq.ts:36

_in_progress

Private _in_progress: Set<Handle>

Defined in: yajsapi/executor/smartq.ts:35

_items

Private _items: null | Item[]

Defined in: yajsapi/executor/smartq.ts:33

_rescheduled_items

Private _rescheduled_items: Set<Handle>

Defined in: yajsapi/executor/smartq.ts:34

Methods

__find_rescheduled_item

__find_rescheduled_item(consumer: Consumer): null | Handle

Parameters:

Name

Type

consumer

Consumer

Returns: null | Handle

Defined in: yajsapi/executor/smartq.ts:71

__have_data

__have_data(): boolean

Returns: boolean

Defined in: yajsapi/executor/smartq.ts:63

close

close(): void

Returns: void

Defined in: yajsapi/executor/smartq.ts:50

get

get(consumer: Consumer, callback: undefined | null | Function): AsyncGenerator<Handle, any, unknown>

Parameters:

Name

Type

consumer

Consumer

callback

undefined | null | Function

Returns: AsyncGenerator<Handle, any, unknown>

Defined in: yajsapi/executor/smartq.ts:78

has_unassigned_items

has_unassigned_items(): boolean

Returns: boolean

Defined in: yajsapi/executor/smartq.ts:160

mark_done

mark_done(handle: Handle): Promise<void>

Parameters:

Name

Type

handle

Handle

Returns: Promise<void>

Defined in: yajsapi/executor/smartq.ts:112

new_consumer

new_consumer(): Consumer

Returns: Consumer

Defined in: yajsapi/executor/smartq.ts:59

reschedule

reschedule(handle: Handle): Promise<void>

Parameters:

Name

Type

handle

Handle

Returns: Promise<void>

Defined in: yajsapi/executor/smartq.ts:124

reschedule_all

reschedule_all(consumer: Consumer): Promise<void>

Parameters:

Name

Type

consumer

Consumer

Returns: Promise<void>

Defined in: yajsapi/executor/smartq.ts:132

stats

stats(): object

Returns: object

Defined in: yajsapi/executor/smartq.ts:146

wait_until_done

wait_until_done(): Promise<void>

Returns: Promise<void>

Defined in: yajsapi/executor/smartq.ts:154