G
G
Golem SDK
Search…
yapapi - Python high-level API
yajsapi - JavaScript high-level API
Yagna Contributor Guide
Powered By GitBook
Class: SmartQueue
yajsapi / Exports / executor/smartq / SmartQueue

Class: SmartQueue

executor/smartq.SmartQueue

Type parameters

Name
Item

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SmartQueue(items, retry_cnt?, ...rest)
Type parameters
Name
Item
Parameters
Name
Type
Default value
items
Item[]
undefined
retry_cnt
number
2
...rest
any[]
undefined
Defined in

Properties

__done

Private __done: any
Defined in

__eof

Private __eof: any
Defined in

__new_items

Private __new_items: any
Defined in

_in_progress

Private _in_progress: Set<Handle>
Defined in

_items

Private _items: null | Item[]
Defined in

_rescheduled_items

Private _rescheduled_items: Set<Handle>
Defined in

Methods

__find_rescheduled_item

__find_rescheduled_item(consumer): null | Handle
Parameters
Name
Type
consumer
Consumer
Returns
null | Handle
Defined in

__have_data

__have_data(): boolean
Returns
boolean
Defined in

close

close(): void
Returns
void
Defined in

get

get(consumer, callback): AsyncGenerator<Handle, any, unknown>
Parameters
Name
Type
consumer
Consumer
callback
undefined | null | Function
Returns
AsyncGenerator<Handle, any, unknown>
Defined in

has_unassigned_items

has_unassigned_items(): boolean
Returns
boolean
Defined in

mark_done

mark_done(handle): Promise
Parameters
Name
Type
handle
Handle
Returns
Promise
Defined in

new_consumer

new_consumer(): Consumer
Returns
Consumer
Defined in

reschedule

reschedule(handle): Promise
Parameters
Name
Type
handle
Handle
Returns
Promise
Defined in

reschedule_all

reschedule_all(consumer): Promise
Parameters
Name
Type
consumer
Consumer
Returns
Promise
Defined in

stats

stats(): object
Returns
object
Defined in

wait_until_done

wait_until_done(): Promise
Returns
Promise
Defined in
Last modified 6d ago