Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Apr 5, 2024
1 parent 3e1feaa commit e64a9a7
Show file tree
Hide file tree
Showing 22 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Action Scheduler is a scalable, traceable job queue for background processing large sets of actions in WordPress. It's specially designed to be distributed in WordPress plugins.

Action Scheduler works by triggering an action hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occassions.
Action Scheduler works by triggering an action hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occasions.

Think of it like an extension to `do_action()` which adds the ability to delay and repeat a hook.

Expand Down
4 changes: 2 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

= 3.7.0 - 2023-11-20 =
* Important: starting with this release, Action Scheduler follows an L-2 version policy (WordPress, and consequently PHP).
* Add extended indexes for hook_status_scheduled_date_gmt and status_sheduled_date_gmt.
* Add extended indexes for hook_status_scheduled_date_gmt and status_scheduled_date_gmt.
* Catch and log exceptions thrown when actions can't be created, e.g. under a corrupt database schema.
* Tweak - WP 6.4 compatibility.
* Update unit tests for upcoming dependency version policy.
Expand Down Expand Up @@ -111,7 +111,7 @@
* Dev - ActionScheduler_wcSystemStatus PHPCS fixes (props @ovidiul). #761
* Dev - ActionScheduler_DBLogger.php PHPCS fixes (props @ovidiul). #768
* Dev - Fixed phpcs for ActionScheduler_Schedule_Deprecated (props @ovidiul). #762
* Dev - Improve actions table indicies (props @glagonikas). #774 & #777
* Dev - Improve actions table indices (props @glagonikas). #774 & #777
* Dev - PHPCS fixes for ActionScheduler_DBStore.php (props @ovidiul). #769 & #778
* Dev - PHPCS Fixes for ActionScheduler_Abstract_ListTable (props @ovidiul). #763 & #779
* Dev - Adds new filter action_scheduler_claim_actions_order_by to allow tuning of the claim query (props @glagonikas). #773
Expand Down
2 changes: 1 addition & 1 deletion classes/ActionScheduler_ActionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function repeat( $action ) {
* This general purpose method can be used in place of specific methods such as async(),
* async_unique(), single() or single_unique(), etc.
*
* @internal Not intended for public use, should not be overriden by subclasses.
* @internal Not intended for public use, should not be overridden by subclasses.
*
* @param array $options {
* Describes the action we wish to schedule.
Expand Down
8 changes: 4 additions & 4 deletions classes/ActionScheduler_AdminView.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected function check_pastdue_actions() {

# Set thresholds.
$threshold_seconds = ( int ) apply_filters( 'action_scheduler_pastdue_actions_seconds', DAY_IN_SECONDS );
$threshhold_min = ( int ) apply_filters( 'action_scheduler_pastdue_actions_min', 1 );
$threshold_min = ( int ) apply_filters( 'action_scheduler_pastdue_actions_min', 1 );

// Set fallback value for past-due actions count.
$num_pastdue_actions = 0;
Expand All @@ -162,7 +162,7 @@ protected function check_pastdue_actions() {
$query_args = array(
'date' => as_get_datetime_object( time() - $threshold_seconds ),
'status' => ActionScheduler_Store::STATUS_PENDING,
'per_page' => $threshhold_min,
'per_page' => $threshold_min,
);

# If no third-party preempted, run default check.
Expand All @@ -171,8 +171,8 @@ protected function check_pastdue_actions() {
$num_pastdue_actions = ( int ) $store->query_actions( $query_args, 'count' );

# Check if past-due actions count is greater than or equal to threshold.
$check = ( $num_pastdue_actions >= $threshhold_min );
$check = ( bool ) apply_filters( 'action_scheduler_pastdue_actions_check', $check, $num_pastdue_actions, $threshold_seconds, $threshhold_min );
$check = ( $num_pastdue_actions >= $threshold_min );
$check = ( bool ) apply_filters( 'action_scheduler_pastdue_actions_check', $check, $num_pastdue_actions, $threshold_seconds, $threshold_min );
}

# If check failed, set transient and abort.
Expand Down
4 changes: 2 additions & 2 deletions classes/ActionScheduler_QueueRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function maybe_dispatch_async_request() {
* should set a context as the first parameter. For an example of this, refer to the code seen in
* @see ActionScheduler_AsyncRequest_QueueRunner::handle()
*
* @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* Generally, this should be capitalised and not localised as it's a proper noun.
* @return int The number of actions processed.
*/
Expand Down Expand Up @@ -152,7 +152,7 @@ public function run( $context = 'WP Cron' ) {
* size is completed, or memory or time limits are reached, defined by @see $this->batch_limits_exceeded().
*
* @param int $size The maximum number of actions to process in the batch.
* @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* Generally, this should be capitalised and not localised as it's a proper noun.
* @return int The number of actions processed.
*/
Expand Down
4 changes: 2 additions & 2 deletions classes/abstracts/ActionScheduler_Abstract_ListTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ public function extra_tablenav( $which ) {

/**
* Set the data for displaying. It will attempt to unserialize (There is a chance that some columns
* are serialized). This can be override in child classes for futher data transformation.
* are serialized). This can be override in child classes for further data transformation.
*
* @param array $items Items array.
*/
Expand Down Expand Up @@ -645,7 +645,7 @@ protected function process_row_actions() {
}

/**
* Default column formatting, it will escape everythig for security.
* Default column formatting, it will escape everything for security.
*
* @param array $item The item array.
* @param string $column_name Column name to display.
Expand Down
6 changes: 3 additions & 3 deletions classes/abstracts/ActionScheduler_Abstract_QueueRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ public function __construct( ActionScheduler_Store $store = null, ActionSchedule
* Process an individual action.
*
* @param int $action_id The action ID to process.
* @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* Generally, this should be capitalised and not localised as it's a proper noun.
*/
public function process_action( $action_id, $context = '' ) {
// Temporarily override the error handler while we process the current action.
set_error_handler(
/**
* Temporary error handler which can catch errors and convert them into exceptions. This faciliates more
* Temporary error handler which can catch errors and convert them into exceptions. This facilitates more
* robust error handling across all supported PHP versions.
*
* @throws Exception
Expand Down Expand Up @@ -364,7 +364,7 @@ protected function batch_limits_exceeded( $processed_actions ) {
* Process actions in the queue.
*
* @author Jeremy Pry
* @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
* Generally, this should be capitalised and not localised as it's a proper noun.
* @return int The number of actions processed.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abstract class ActionScheduler_Abstract_RecurringSchedule extends ActionSchedule
protected $first_timestamp = NULL;

/**
* The recurrance between each time an action is run using this schedule.
* The recurrence between each time an action is run using this schedule.
* Used to calculate the start date & time. Can be a number of seconds, in the
* case of ActionScheduler_IntervalSchedule, or a cron expression, as in the
* case of ActionScheduler_CronSchedule. Or something else.
Expand All @@ -36,7 +36,7 @@ abstract class ActionScheduler_Abstract_RecurringSchedule extends ActionSchedule

/**
* @param DateTime $date The date & time to run the action.
* @param mixed $recurrence The data used to determine the schedule's recurrance.
* @param mixed $recurrence The data used to determine the schedule's recurrence.
* @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance.
*/
public function __construct( DateTime $date, $recurrence, DateTime $first = null ) {
Expand Down
2 changes: 1 addition & 1 deletion classes/abstracts/ActionScheduler_Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function log_ignored_action( $action_id, $context = '' ) {

/**
* @param string $action_id
* @param Exception|NULL $exception The exception which occured when fetching the action. NULL by default for backward compatibility.
* @param Exception|NULL $exception The exception which occurred when fetching the action. NULL by default for backward compatibility.
*
* @return ActionScheduler_LogEntry[]
*/
Expand Down
4 changes: 2 additions & 2 deletions classes/abstracts/ActionScheduler_Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ protected function validate_sql_comparator( $comparison_operator ) {
}

/**
* Get the time MySQL formated date/time string for an action's (next) scheduled date.
* Get the time MySQL formatted date/time string for an action's (next) scheduled date.
*
* @param ActionScheduler_Action $action
* @param DateTime $scheduled_date (optional)
Expand All @@ -265,7 +265,7 @@ protected function get_scheduled_date_string( ActionScheduler_Action $action, Da
}

/**
* Get the time MySQL formated date/time string for an action's (next) scheduled date.
* Get the time MySQL formatted date/time string for an action's (next) scheduled date.
*
* @param ActionScheduler_Action $action
* @param DateTime $scheduled_date (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function register() {
protected function post_type_args() {
$args = array(
'label' => __( 'Scheduled Actions', 'action-scheduler' ),
'description' => __( 'Scheduled actions are hooks triggered on a cetain date and time.', 'action-scheduler' ),
'description' => __( 'Scheduled actions are hooks triggered on a certain date and time.', 'action-scheduler' ),
'public' => false,
'map_meta_cap' => true,
'hierarchical' => false,
Expand Down
2 changes: 1 addition & 1 deletion classes/migration/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function set_source_store( Store $store ) {
}

/**
* Get the configured source loger.
* Get the configured source logger.
*
* @return ActionScheduler_Logger
*/
Expand Down
2 changes: 1 addition & 1 deletion classes/schedules/ActionScheduler_CronSchedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function get_recurrence() {
/**
* Serialize cron schedules with data required prior to AS 3.0.0
*
* Prior to Action Scheduler 3.0.0, reccuring schedules used different property names to
* Prior to Action Scheduler 3.0.0, recurring schedules used different property names to
* refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
* was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
* aligned properties and property names for better inheritance. To guard against the
Expand Down
2 changes: 1 addition & 1 deletion classes/schedules/ActionScheduler_IntervalSchedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function interval_in_seconds() {
/**
* Serialize interval schedules with data required prior to AS 3.0.0
*
* Prior to Action Scheduler 3.0.0, reccuring schedules used different property names to
* Prior to Action Scheduler 3.0.0, recurring schedules used different property names to
* refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
* was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
* aligned properties and property names for better inheritance. To guard against the
Expand Down
2 changes: 1 addition & 1 deletion deprecated/ActionScheduler_AdminView_Deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static function maybe_execute_action() {
* Convert an interval of seconds into a two part human friendly string.
*
* The WordPress human_time_diff() function only calculates the time difference to one degree, meaning
* even if an action is 1 day and 11 hours away, it will display "1 day". This funciton goes one step
* even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step
* further to display two degrees of accuracy.
*
* Based on Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/
Expand Down
2 changes: 1 addition & 1 deletion docs/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn how to administer background jobs with the Action Scheduler j

Action Scheduler has a built in administration screen for monitoring, debugging and manually triggering scheduled actions.

The administration interface is accesible through both:
The administration interface is accessible through both:

1. **Tools > Scheduled Actions**
1. **WooCommerce > Status > Scheduled Actions**, when WooCommerce is installed.
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Reference guide for background processing functions provided by the
---
# API Reference

Action Scheduler provides a range of functions for scheduling hooks to run at some time in the future on one or more occassions.
Action Scheduler provides a range of functions for scheduling hooks to run at some time in the future on one or more occasions.

To understand the scheduling functions, it can help to think of them as extensions to WordPress' `do_action()` function that add the ability to delay and repeat when the hook will be triggered.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Action Scheduler - Background Processing Job Queue for WordPress
---
## WordPress Job Queue with Background Processing

Action Scheduler is a library for triggering a WordPress hook to run at some time in the future (or as soon as possible, in the case of an async action). Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occassions.
Action Scheduler is a library for triggering a WordPress hook to run at some time in the future (or as soon as possible, in the case of an async action). Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occasions.

Think of it like an extension to `do_action()` which adds the ability to delay and repeat a hook.

Expand Down
2 changes: 1 addition & 1 deletion docs/perf.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Specifically, Action Scheduler will only process actions in a request until:
* processing another 3 actions would exceed 30 seconds of total request time, based on the average processing time for the current batch
* in a single concurrent queue

While Action Scheduler will initiate an asychronous loopback request to process additional actions, on sites with very large queues, this can result in slow processing times.
While Action Scheduler will initiate an asynchronous loopback request to process additional actions, on sites with very large queues, this can result in slow processing times.

While using [WP CLI to process queues](/wp-cli/) is the best approach to increasing processing speed, on occasion, that is not a viable option. In these cases, it's also possible to increase the processing thresholds in Action Scheduler to increase the rate at which actions are processed by the default queue runner.

Expand Down
2 changes: 1 addition & 1 deletion docs/wp-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ For example, consider two scheduled actions for the same subscription:
* `scheduled_payment` scheduled for `2015-11-13 00:00:00` and
* `scheduled_expiration` scheduled for `2015-11-13 00:01:00`.

Under normal conditions, Action Scheduler will ensure the `scheduled_payment` action is run before the `scheduled_expiration` action. Becuase that's how they are scheduled.
Under normal conditions, Action Scheduler will ensure the `scheduled_payment` action is run before the `scheduled_expiration` action. Because that's how they are scheduled.

However, when using the `--hooks` option, the `scheduled_payment` and `scheduled_expiration` actions will be processed in separate queues. As a result, this dependency is not guaranteed.

Expand Down
6 changes: 3 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Action Scheduler - Job Queue for WordPress

Action Scheduler is a scalable, traceable job queue for background processing large sets of actions in WordPress. It's specially designed to be distributed in WordPress plugins.

Action Scheduler works by triggering an action hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occassions.
Action Scheduler works by triggering an action hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occasions.

Think of it like an extension to `do_action()` which adds the ability to delay and repeat a hook.

Expand Down Expand Up @@ -63,7 +63,7 @@ Collaboration is cool. We'd love to work with you to improve Action Scheduler. [

= 3.7.0 - 2023-11-20 =
* Important: starting with this release, Action Scheduler follows an L-2 version policy (WordPress, and consequently PHP).
* Add extended indexes for hook_status_scheduled_date_gmt and status_sheduled_date_gmt.
* Add extended indexes for hook_status_scheduled_date_gmt and status_scheduled_date_gmt.
* Catch and log exceptions thrown when actions can't be created, e.g. under a corrupt database schema.
* Tweak - WP 6.4 compatibility.
* Update unit tests for upcoming dependency version policy.
Expand Down Expand Up @@ -158,7 +158,7 @@ Collaboration is cool. We'd love to work with you to improve Action Scheduler. [
* Dev - ActionScheduler_wcSystemStatus PHPCS fixes (props @ovidiul). #761
* Dev - ActionScheduler_DBLogger.php PHPCS fixes (props @ovidiul). #768
* Dev - Fixed phpcs for ActionScheduler_Schedule_Deprecated (props @ovidiul). #762
* Dev - Improve actions table indicies (props @glagonikas). #774 & #777
* Dev - Improve actions table indices (props @glagonikas). #774 & #777
* Dev - PHPCS fixes for ActionScheduler_DBStore.php (props @ovidiul). #769 & #778
* Dev - PHPCS Fixes for ActionScheduler_Abstract_ListTable (props @ovidiul). #763 & #779
* Dev - Adds new filter action_scheduler_claim_actions_order_by to allow tuning of the claim query (props @glagonikas). #773
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/jobstore/ActionScheduler_DBStore_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,6 @@ public function test_child_actions_are_processed_in_correct_order() {
remove_action( 'foo', $watcher );
add_action( 'parent', $parent_action );

$this->assertEquals( range( 1, 20 ), $actual_order, 'Once claimed, scheduled actions are executed in the exepcted order, including if "child actions" are scheduled from within another action.' );
$this->assertEquals( range( 1, 20 ), $actual_order, 'Once claimed, scheduled actions are executed in the expected order, including if "child actions" are scheduled from within another action.' );
}
}

0 comments on commit e64a9a7

Please sign in to comment.