Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using the hosting_git module to receive webhooks it could happen that multiple git pull tasks were scheduled.
This would happen when the pull task is slow and a developer is pushing frequently.
Comment | File | Size | Author |
---|---|---|---|
#4 | avoid_duplicating_tasks-2622918-4.patch | 1.03 KB | helmo |
Comments
Comment #2
helmo CreditAttribution: helmo at Initfour websolutions commentedComment #3
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedWrong patch file, just says "Already up-to-date.".
Comment #4
helmo CreditAttribution: helmo at Initfour websolutions commentedsorry, here's the patch.
Comment #5
ergonlogicComment #6
ergonlogicWe should probably support the '--force' flag here, as we do with running a task that isn't queued. For example, it seems like it could be reasonable to queue up multiple tasks with backups or verifies in between...
Comment #7
ergonlogicI'm not sure that this needs to be a WATCHDOG_WARNING either. I suspect a notice should be sufficient.
Also, enabling two Hosting Features at once appears to trigger two verify tasks on the hostmaster site. Might be a convenient way to test this.
Comment #8
helmo CreditAttribution: helmo at Initfour websolutions commentedI'm ok with it being a notice.
Not sure about the need for a --force option, when working from the cli I usually just run the task at hand, not queue it.
Comment #9
ergonlogicIf, for example, a remote SaaS front-end were to make a call to clone a template site multiple times, this patch would block that, no? --force would allow us to bypass this, at least. Ideally, we'd have a checklist of tasks to control this behaviour individually.
Comment #10
ergonlogicActually, I'm pretty sure #2694037: Forbid duplicates of certain task types is a duplicate of this, but appears further along. I'm going to close this one as a result. Feel free to re-open.
Amusingly, we've all been making the same arguments over there.
Comment #11
ergonlogic