Skip to main content

Job Queue

The operation A-Parser'of is based on a job queue—you add jobs, and they are executed in order, allowing you to load the scraper with work for a long time without needing to monitor when it finishes.

Tasks queue

Key advantages of the job queue in A-Parser

  • Support for simultaneous execution of multiple jobs
  • Pausing and complete stopping of job execution
  • Saving intermediate results of jobs, which allows resuming work from the moment the scraper was shut down (or the computer/server was turned off)
  • Moving individual jobs within the queue
  • Ability to edit already created jobs, as well as copy jobs for reuse
  • Completed jobs move to the completed jobs queue, where you can view the results of each job and download the output

Algorithm

Task queue algorithm

Working slots for jobs

The number of simultaneously running jobs is regulated by working slots, This parameter is specified in the general settings (Settings -> General Settings -> Maximum active jobs). The default value is 1, meaning one job runs simultaneously, and others wait their turn.

Job statuses in the queue

Each job has its own status; here is a list of possible states:

StatusDescription
waitSlotWaiting for an available slot to execute the job; a new job always enters the queue with this status
workJob is running
pausedJob is paused, but it retains the working slot, preventing subsequent jobs from starting
stoppedJob is stopped, which frees up the working slot
completedJob is completed - all requests have been processed, the job moves to the completed jobs queue, and the working slot is freed up

|Status|Description|

tip

|waitSlot|Waiting for an available slot to execute the job; a new job always enters the queue with this status|