-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.1.1 don't let actions run for more than 25s. Add ActionScheduler pu…
…rge cronjob.
- Loading branch information
1 parent
0b66fe5
commit a7fecd5
Showing
5 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# Copyright (C) 2024 OllieJones | ||
# Copyright (C) 2024 Ollie Jones | ||
# This file is distributed under the GPLv2. | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Fast Woo Order Lookup 1.1.0\n" | ||
"Project-Id-Version: Fast Woo Order Lookup 1.1.1\n" | ||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/fast-woo-order-lookup\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"POT-Creation-Date: 2024-08-11T06:30:30-04:00\n" | ||
"POT-Creation-Date: 2024-08-14T13:46:02-04:00\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"X-Generator: WP-CLI 2.9.0\n" | ||
"X-Domain: fast-woo-order-lookup\n" | ||
|
@@ -27,7 +27,7 @@ msgid "Look up orders faster in large WooCommerce stores with many orders." | |
msgstr "" | ||
|
||
#. Author of the plugin | ||
msgid "OllieJones" | ||
msgid "Ollie Jones" | ||
msgstr "" | ||
|
||
#. Author URI of the plugin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
# Purge the action scheduler. | ||
# | ||
# The ActionScheduler in WooCommerce (and other WordPress subsystems) accumulates complete, failed, and canceled actions. | ||
# | ||
# This shell script, run as a cronjob (debugged on Ubuntu GNU/Linux) deletes old actions | ||
# to keep the wp_actionscheduler_actions table from growing too large. | ||
# It puts an entry into /var/log/syslog saying how many actions it purged. | ||
# | ||
# The following crontab entry will run this purge script each day at 04:01 | ||
# | ||
# You need to change '/var/www/html/' to the top level directory of your WordPress installation, and take off the | ||
# leading # comment character when you put this entry into the crontab. | ||
# | ||
# 1 4 * * * /var/www/html/wp-content/plugins/fast-woo-order-lookup/scripts/purge-action-scheduler >>/tmp/foo 2>>/tmp/foo | ||
|
||
cd `dirname $0` | ||
cd ../../../.. | ||
echo -n $0 >/tmp/purge-action-scheduler$$ | ||
wp action-scheduler clean --status=complete,failed,canceled --before='60 days ago' --batch-size=1000 --pause=2 | grep deleted | tail -1 >>/tmp/purge-action-scheduler$$ | ||
logger --file /tmp/purge-action-scheduler$$ | ||
rm /tmp/purge-action-scheduler$$ |