Comments (4)
Scope a solution
-
Create
submitted_at
field in the RUCSS table
- update
inc/Engine/Optimization/RUCSS/Database/Row/UsedCSS.php
inc/Engine/Optimization/RUCSS/Database/Schemas/UsedCSS.php
inc/Engine/Optimization/RUCSS/Database/Tables/UsedCSS.php
to add a nullable timestamp columnsubmitted_at
FYI: similar to what was done in this PR
- set the new column value to the current timestamp in
and
-
store more info in the
message
column
the message
column is a longtext
so it will hold a lot of data.
in make_status_failed
we need to concatenate to the previous value and formate it like the suggestion above
Y-m-d H:i:s {status_code}: {error_message};
-
Replace "Bad Json"
-
Replace "Bad Json" in get_queue_job_status by: "No message. Defaulted in get_queue_job_status"
-
Replace "Bad Json" in add_to_queue by: "No message. Defaulted in add_to_queue"
Estimate effort
Effort S
from wp-rocket.
Looks good, thanks.
Just an additional point for the concatenation in message:
make_status_failed
is only called if retries >=3
in check_job_status
. So in order to store messages for intermediary retires, we would need to add an else logic:
if ( $row_details->retries >= 3 ) {
Logger::debug( 'RUCSS: Job failed 3 times for url: ' . $row_details->url );
/**
* Unlock preload URL.
*
* @param string $url URL to unlock
*/
do_action( 'rocket_preload_unlock_url', $row_details->url );
$this->used_css_query->make_status_failed( $id, strval( $job_details['code'] ), $job_details['message'] );
return;
}
else{
$this->used_css_query->update_message($id, strval( $job_details['code'] ), $job_details['message'])
}
With update_message
that is a new method that concatenates new data to the existing message.
from wp-rocket.
thanks, @MathieuLamiot I totally missed this one.
in that case, I suggest updating the message with the retries increment to cover the 408 cases too
from wp-rocket.
Sounds good, either in the increment_retries method, or in a dedicated method next to it. 👍
from wp-rocket.
Related Issues (20)
- WP-Rocket outage today - Makes the plugin unusable HOT 17
- Fatal Error: Argument #3 ($code) must be of type int, string given HOT 1
- Avoid requests to wp-rocket.me to negatively impact site performances during downtime HOT 9
- Skip invisible elements as LCP candidates
- Skip elements without a background as LCP candidates
- Bump WordPress compatible version up to 6.5.4 HOT 2
- As a support agent, I want to be able skip specific LCP elements by selectors for diagnosis and patch issues
- In Dashboard, remove My Status and move analytics to My Account
- Beacon is picking `mp4` as an LCP element in `video`
- As a OCI user, I want control over the accuracy/quick triggering trade-off of the beacon so that I can reduce wrong detection on pages with large images or users with slow internet connections HOT 1
- FetchPriority should ignore inline images (e.g. encoded SVgs) HOT 1
- Largest element with a background-image that is not kept (such as linear-gradient) makes the OCI optimization have no LCP HOT 4
- Truncate OCI table on update to 3.16.1
- 404 file mini file CSS & JS (When using Nginx Cache + Wp Rocket) HOT 1
- Not compatible with Complianz Premium plugin (Cookie consent) HOT 1
- Not compatible with PHP 8.1 HOT 1
- PHP Warning: Undefined array key "returnvalue"
- Clear Used CSS button in Divi notice does not work
- Rebrand `Remove Unused CSS` to `Reduce Unused CSS` to reflect what the feature does HOT 1
- Wrong CSS/JS link in subdomain HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-rocket.