Submit
Path:
~
/
/
var
/
softaculous
/
sitepad
/
editor
/
site-data
/
plugins
/
kkart-pro
/
packages
/
action-scheduler
/
classes
/
File Content:
ActionScheduler_OptionLock.php
<?php /** * Provide a way to set simple transient locks to block behaviour * for up-to a given duration. * * Class ActionScheduler_OptionLock * @since 3.0.0 */ class ActionScheduler_OptionLock extends ActionScheduler_Lock { /** * Set a lock using options for a given amount of time (60 seconds by default). * * Using an autoloaded option avoids running database queries or other resource intensive tasks * on frequently triggered hooks, like 'init' or 'shutdown'. * * For example, ActionScheduler_QueueRunner->maybe_dispatch_async_request() uses a lock to avoid * calling ActionScheduler_QueueRunner->has_maximum_concurrent_batches() every time the 'shutdown', * hook is triggered, because that method calls ActionScheduler_QueueRunner->store->get_claim_count() * to find the current number of claims in the database. * * @param string $lock_type A string to identify different lock types. * @bool True if lock value has changed, false if not or if set failed. */ public function set( $lock_type ) { return update_option( $this->get_key( $lock_type ), time() + $this->get_duration( $lock_type ) ); } /** * If a lock is set, return the timestamp it was set to expiry. * * @param string $lock_type A string to identify different lock types. * @return bool|int False if no lock is set, otherwise the timestamp for when the lock is set to expire. */ public function get_expiration( $lock_type ) { return get_option( $this->get_key( $lock_type ) ); } /** * Get the key to use for storing the lock in the transient * * @param string $lock_type A string to identify different lock types. * @return string */ protected function get_key( $lock_type ) { return sprintf( 'action_scheduler_lock_%s', $lock_type ); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
WP_CLI
---
0755
abstracts
---
0755
actions
---
0755
data-stores
---
0755
migration
---
0755
schedules
---
0755
schema
---
0755
ActionScheduler_ActionClaim.php
374 bytes
0644
ActionScheduler_ActionFactory.php
7939 bytes
0644
ActionScheduler_AdminView.php
5161 bytes
0644
ActionScheduler_AsyncRequest_QueueRunner.php
2221 bytes
0644
ActionScheduler_Compatibility.php
3143 bytes
0644
ActionScheduler_DataController.php
5263 bytes
0644
ActionScheduler_DateTime.php
1592 bytes
0644
ActionScheduler_Exception.php
211 bytes
0644
ActionScheduler_FatalErrorMonitor.php
2023 bytes
0644
ActionScheduler_InvalidActionException.php
1255 bytes
0644
ActionScheduler_ListTable.php
19023 bytes
0644
ActionScheduler_LogEntry.php
1764 bytes
0644
ActionScheduler_NullLogEntry.php
219 bytes
0644
ActionScheduler_OptionLock.php
1777 bytes
0644
ActionScheduler_QueueCleaner.php
5140 bytes
0644
ActionScheduler_QueueRunner.php
7530 bytes
0644
ActionScheduler_Versions.php
1263 bytes
0644
ActionScheduler_WPCommentCleaner.php
4392 bytes
0644
ActionScheduler_wcSystemStatus.php
4512 bytes
0644
N4ST4R_ID | Naxtarrr