Make my queue worker create other queue tasks, is this viable?
Jamroom Developers
Hi Jamroom Team!
This is a question to check my thinking before writing some code, any thoughts will be much appreciated.
I have a system where power users create and then configure and populate "sub" profiles into a quota which is set as private by default. When their sub profiles are ready to "publish" they can notify admin and I then run manual checks to see that they have populated and configured their sub profiles correctly and that the quality is ok. Under some circumstances I then convert some of their media manually (using some admin tools which add to queues). Then I change the privacy of the profile to public, it has been "published".
What I want to do now is to automate that process so they click a publish button, each of the pre-publish tasks is added to a queue and if they are all complete successfully the profile privacy is set to public.
I'm thinking that I can create a "publish" queue worker which spawns a series of "sub" queue workers which update the main queue worker when they complete successfully. If anything goes wrong then admin is notified, otherwise the profile is published.
Does that sound sensible? Can I use a queue worker to spawn other queued tasks and then complete or error depending on their success or failure? Or is that just asking for trouble?
Are there any existing examples of using a queue in this way?
Thanks for any advice!
updated by @ultrajam: 04/15/18 06:53:16AM