yvi: woman showing her biceps, text: "We can DW it" (Dreamwidth)
yvi ([personal profile] yvi) wrote in [site community profile] dw_dev2010-02-21 04:43 pm
Entry tags:

When to use a Worker?

Can any of you more experienced people tell me roughly when it is a good idea to write a TheSchwartz-scheduled Worker? Looking at the workers in existence, it's for things that need to work on all users or all clusters (latest feed, invite code distribution, userpic renaming), things that can take a long time (importer) or that don't need to happen instantly and may need to be tried a few times (crossposting).

I am asking both for curiosity and because I am working on merging tags (taking a list of tags and for each entry with that tag, adding the new tag is added and deleting the old tags), which I think is not such a heavy load that it would require a worker, but I thought I'd ask.
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)

[personal profile] pauamma 2010-02-21 07:05 pm (UTC)(link)
What you said is essentially correct. (You forgot things that happen periodically without human intervention, like expiring paid accounts or renewing them if said to recurring billing by credit card, but that's not relevant here.)

But in this case, I don't think it's needed. Merging a tag isn't really different, here, from deleting a tag (not just removing it from an entry - completely deleting it) or an access group, neither of which (IIRC) uses TheSchwartz.