Options
All
  • Public
  • Public/Protected
  • All
Menu

Module specHelper

Index

Functions

buildConnection

  • buildConnection(): Promise<any>

deleteEnqueuedTasks

  • deleteEnqueuedTasks(taskName: string, params: {}): Promise<void>
  • Delete all enqueued instances of a task, both in all the normal queues and all of the delayed queues

    Parameters

    • taskName: string
    • params: {}

    Returns Promise<void>

findEnqueuedTasks

  • findEnqueuedTasks(taskName: string): Promise<any[]>
  • Use the specHelper to find enqueued instances of a task This will return an array of instances of the task which have been enqueued either in the normal queues or delayed queues If a task is enqueued in a delayed queue, it will have a 'timestamp' property i.e. [ { class: 'regularTask', queue: 'testQueue', args: [ [Object] ] } ]

    Parameters

    • taskName: string

    Returns Promise<any[]>

getStaticFile

  • getStaticFile(file: string): Promise<any>
  • Mock a specHelper connection requesting a file from the server.

    Parameters

    • file: string

    Returns Promise<any>

runAction

  • runAction(actionName: string, input?: {}): Promise<{}>
  • Run an action via the specHelper server.

    Parameters

    • actionName: string
    • Default value input: {} = {}
      • [key: string]: any

    Returns Promise<{}>

runFullTask

  • runFullTask(taskName: string, params: object | Array<any>): Promise<any>
  • Use the specHelper to run a task. Note: this will run a full Task worker, and will also include any middleware. This is slower than api.specHelper.runTask.

    Parameters

    • taskName: string
    • params: object | Array<any>

    Returns Promise<any>

runTask

  • runTask(taskName: string, params: object | Array<any>): Promise<{}>
  • Use the specHelper to run a task. Note: this only runs the task's run() method, and no middleware. This is faster than api.specHelper.runFullTask.

    Parameters

    • taskName: string
    • params: object | Array<any>

    Returns Promise<{}>

Generated using TypeDoc