Throw a rebake with using an SQL query only - is it possible?

AI-generated summary

The discussion explores whether it’s possible to trigger a rebake for posts using only an SQL query. meglio asks if posts can be queued for rebaking via SQL, given that updates to the raw column alone don’t trigger rebaking. fefrei suggests clearing the cooked version, which should prompt a Sidekiq job to queue a rebake. meglio questions how the message will behave if the cooked version is missing. sam confirms that setting baked_version = 0 via SQL will queue a full rebake, but meglio clarifies that this cannot be done from the Data Explorer due to write restrictions. fefrei adds that rebaking may occur on demand, with the system continuing to function normally.

So, I have a few SQL queries that “fix” some common issues in posts. Running an SQL query updates the raw column only. Now, is there a way to somehow queue those posts for rebaking provided I know their IDs? I mean, maybe there is kind of sidekiq queue where we could put the rebake tasks for the posts?

While I can’t find the source right now, I think that clearing the cooked version should suffice: One of the regular Sidekiq jobs should then automatically queue a baking task.

How will displaying the message behave if it needs to be displayed but no cooked version present yet?

This will queue a background full rebake

./launcher enter app
rails c
Post.exec_sql('update posts set baked_version = 0')

Excellent, so I can do the same with an SQL query right from the data explorer, can I?

No you can not do this from data explorer we explicitly disallow write there.

I think it bakes on demand – at least my installation continued looking normally when I did this.