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

(Anton) #1

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?

(Felix Freiberger) #2

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.

(Anton) #3

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

(Sam Saffron) #4

This will queue a background full rebake

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

(Anton) #5

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

(Sam Saffron) #6

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

(Felix Freiberger) #7

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