Docs

WP_Background_Process::lock_process()

Lock process

Description

Lock the process so that multiple instances can’t run simultaneously.
Override if applicable, but the duration should be greater than that defined in the time_exceeded() method.

Hooks

apply_filters( “{$this->identifier}_queue_lock_time” )

Abstract WP_Background_Process class.