We can get way with this if there's few flags expiring at a time but with large sites and lots of flags, make no mistake, things will probably break!

Comments

alexweber’s picture

Status: Active » Needs review
StatusFileSize
new5.23 KB

I couldn't help myself :)

joachim’s picture

Status: Needs review » Fixed

Thanks!

Committed, with a few tweaks to the code comments.

I think in the long run, this could maybe do with some follow-up tweaks on a few points:

- I'm concerned what happens with queues if items are still in the queue when hook_cron() runs again and puts MORE items in
- the 'flagging_date' date case might need a subqueue, as it loads every flagging entity that needs to be expired and that could be quite heavy too
- we should probably use the flag name as queue worker parameter rather than the whole flag object, as that could become stale if the admin user makes changes. Also, it's less to store in the DB.

But as I said in the other issue over on Flag, this module is on minimal maintenance now, as the project I developed it for folded. So those can all be considered postponed.

alexweber’s picture

For sure, I realised that when I looked at the activity for this module but figured it couldn't hurt to implement this :)

As far as the stacking cron operations goes, I'm really not sure how that works but I assume that's one for the core cron queue team to deal with and we can just assume that it works...

Thanks for the feedback and credit!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.