Desynchronized Spider

This abstract class can be extended to produce new plugins that do not require a system-wide configuration synchronization.


class pathspider.desync.DesynchronizedSpider(worker_count, libtrace_uri, args, server_mode=False)[source]

Since there is no need for a configurator thread in a desynchronized spider, this thread is a no-op

connections = []
classmethod register_args(subparsers)[source]

This function provides the logic for non-synchronized worker threads.

Parameters:worker_number (int) – The unique number of the worker.

The workers operate as continuous loops:

  • Fetch next job from the job queue
  • For each connection, perform the connection and pass the result to the merger
  • Do it all again

If the job fetched is the SHUTDOWN_SENTINEL, then the worker will terminate as this indicates that all the jobs have now been processed.