Commit Graph

75 Commits

Author SHA1 Message Date
Rostislav Wolny
bf7bd6d2d9 Fix other phpstan errors in lib
[MAILPOET-3146]
2020-10-08 15:59:05 +02:00
Pavel Dohnal
414fa44d2c Check if url is parsed properly
[MAILPOET-2716]
2020-04-24 11:44:09 +02:00
Pavel Dohnal
d586a18e52 Remove redundant condition
[MAILPOET-2716]
2020-04-24 11:44:09 +02:00
Jan Jakeš
153c72cd77 Autofix long scalar typehints to short ones
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00
Jan Jakeš
54549ff037 Convert variable names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
Amine Ben hammou
43df66d162 Add public keyword to methods
[MAILPOET-2413]
2019-12-26 18:09:45 +03:00
wxa
ed7784d945 Refactor CronHelper to a service [MAILPOET-2459] 2019-11-06 09:58:36 +00:00
wxa
8f4321487b Remove AspectMock from CronHelperTest [MAILPOET-2464] 2019-10-30 23:22:48 +00:00
wxa
b8334cb843 Do not progressively reschedule on cron execution timeout [MAILPOET-2392] 2019-10-16 13:55:01 +01:00
Pavel Dohnal
1bedf1fd1a Allow modifing cron limits
[MAILPOET-2367]
2019-09-25 13:21:17 +01:00
Jan Jakeš
01a0fe96c4 Remove no longer necessary checks
[MAILPOET-1948]
2019-09-12 13:59:32 +02:00
Rostislav Wolny
4588d9ee67 Remove unused parameter from pingDaemon
[MAILPOET-2290]
2019-08-23 12:12:12 -04:00
Rostislav Wolny
89ed90dddb Fix task scheduler isReachable status
[MAILPOET-2290]
2019-08-23 12:12:12 -04:00
wxa
4d45e97ec4 Add last seen error date to the system status page [MAILPOET-2083] 2019-05-21 11:07:26 -04:00
Pavel Dohnal
5da7110eb6 Use short array syntax
[MAILPOET-2090]
2019-05-20 10:18:45 -04:00
Amine Ben hammou
0a436087e1 Replace all WP function calls 2019-03-07 08:30:14 -05:00
wxa
fb77167a1f Remove unused imports [MAILPOET-1825] 2019-02-21 09:51:53 -05:00
Ján Mikláš
3ee58aea10 Add space between if and ‘(‘
[MAILPOET-1791]
2019-02-13 08:26:27 -05:00
Rostislav Wolny
ff238bf69a Refactor MailPoet\Cron to use new settings
[MAILPOET-1757]
2019-01-31 15:57:58 +01:00
Amine Ben hammou
8b602bd947 Move WPHooks methods to WPFunctions 2019-01-31 13:25:00 +01:00
Amine Ben hammou
a46d98ec44 Refactor WPFunctions to be injectable with DI 2018-12-12 16:43:52 +01:00
Pavel Dohnal
f81323ad52 Rename Daemon to DaemonHttpRunner
[MAILPOET-1538]
2018-10-03 10:28:26 +02:00
Pavel Dohnal
8ea06f3f31 Use POST for cron requests
[MAILPOET-1485]
2018-08-16 08:27:05 +02:00
Pavel Dohnal
a3b79a6907 Fix overriding cron token 2018-07-31 17:48:26 +02:00
Rostislav Wolny
3184b43b3b Add status flag for cron deactivation
Cron daemon, which was triggered by WordPress method, was deactivated
by deletion from DB and it caused the lost of all log data about it.
This commit changes the implementation so that the daemon is deactivated by changing status flag.

[MAILPOET-1457]
2018-07-25 13:23:21 +02:00
Rostislav Wolny
3c7cd193b6 Detect not accessible cron daemon [MAILPOET-801]
This adds a function to a CronHelper which detect accessibility problem based on timestamps
which are stored during cron execution. The main idea is that the cron daemon should update run_started_at
within the REQUEST_TIMEOUT after it was accessed (run_accessed_at).
2018-07-11 09:27:19 +02:00
Rostislav Wolny
083372a391 Store timestamps and last error during cron process [MAILPOET-801] 2018-07-11 09:27:14 +02:00
Rostislav Wolny
e0052bbb93 Sanitize correct cron ping response [MAILPOET-1291] 2018-02-16 18:06:41 +00:00
Vlad
819d4dc17a Abstracts WP functions 2018-01-15 19:52:51 -05:00
Vlad
0e2a67c203 Validates ping response when displaying cron URL status 2017-12-18 20:28:09 -05:00
Vlad
02966c3b93 Sets cron daemon timeout to 5s across the plugin
Adds hook to override cron request arguments
2017-09-20 14:59:48 +01:00
Pavel Dohnal
84dc48daec Allow passing cron timeouts
[MAILPOET-1114]
2017-09-20 14:59:48 +01:00
Pavel Dohnal
12225004f4 Apply hook on cron timeout
[MAILPOET-1114]
2017-09-20 14:59:48 +01:00
Vlad
320dfa2ec5 Extracts duplicate code into reusable methods
Updates unit test
2017-09-20 14:59:48 +01:00
Vlad
b5f3016085 Removes URL from user agent
(https://mailpoet.slack.com/archives/C02MTKAJL/p1505488541000029?thread_ts=1505488163.000795&cid=C02MTKAJL)
2017-09-20 14:59:48 +01:00
Vlad
cd53e369d0 Allows accessing full URL from within custom cron hook 2017-09-20 14:59:48 +01:00
Vlad
6fc11af774 Returns error message instead of empty body 2017-09-20 14:59:48 +01:00
Vlad
52470360a1 Returns ping response body instead of boolean 2017-09-10 18:49:15 -04:00
Vlad
6c62459ed4 Adds filter to override default cron request URL 2017-09-10 18:36:22 -04:00
Pavel Dohnal
fcf272b44a Fix lint error 2017-06-07 11:49:07 +01:00
Pavel Dohnal
5349f3a59a Use ssl while checking url
My internet provider tried to be helpfull and offeres content on
invalid urls. That is only behaviour for http:// scheme and not
for https:// scheme so I need to enforce ssl so that invalid url
fails even in my house.
2017-06-07 11:30:31 +01:00
Vlad
a6b00e1ba7 - Adds new "ping" cron daemon router endpoint
- Removes the requirement to have data payload for router requests
2017-01-08 22:25:39 -05:00
Vlad
bf36deccb2 - Enables blocking requests for Cron and fixes an issue on hosts that
don't support non-blocking requests
2016-11-29 15:03:51 -05:00
Vlad
2955b6d5a0 - Clarifies const values 2016-11-28 09:50:32 -05:00
Jonathan Labreuille
7fbf84db1f converted text domain to string instead of constant 2016-09-30 09:58:26 +02:00
Jonathan Labreuille
42202f676a updated Env::plugin_name to constant for text domain 2016-09-27 14:54:23 +02:00
Jonathan Labreuille
ba6198f956 added textdomain to __() calls 2016-09-27 14:53:44 +02:00
Vlad
b37e85eeb5 - Removes unused method 2016-09-18 23:15:41 -04:00
Vlad
3508ac36b4 - Removes daemon status logic and updates tests
- Refactors daemon
- Adds daemon unit tests
2016-09-08 19:22:42 -04:00
Vlad
d9fbbdc02d - Updates code comments 2016-08-31 09:23:12 -04:00