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.
Is it possible for p-queue-work to invalidate all items instead of claiming based on limit ?
Comment | File | Size | Author |
---|---|---|---|
#6 | p_queue_work_allow_to-2834228-6.patch | 2.47 KB | abhishek-anand |
#5 | p_queue_work_allow_to-2834228-5.patch | 1.08 KB | abhishek-anand |
#3 | 2834228-3.patch | 3.39 KB | joshi.rohit100 |
#2 | 2834228-2.patch | 4.6 KB | joshi.rohit100 |
Comments
Comment #2
joshi.rohit100This is some batch porting of http://cgit.drupalcode.org/acquia_purge/tree/acquia_purge.drush.inc?h=7.... . But in batch way it looks like lots of code duplicacy as in batch you cant pass objects as param due to serialization problem.
Also as discussed with @nielsvm @adam.weingarten, we should try to spawn new processes (or child processes), So I am trying to use the http://php.net/manual/en/function.proc-open.php but struggling with 2 problems - a) as command argument needs the command name but different systems have different drush path so I think we can't directly use the 'drush p-queue-work'.
I was also checking the pcntl_fork() but not sure if we need to spawn child process or completely a separate process.
Comment #3
joshi.rohit100This patch contains something with proc_open().
2 Things I am unable to get is -
.
Comment #4
joshi.rohit100This is with pcntl_fork() sample. Not in loop.
Comment #5
abhishek-anand CreditAttribution: abhishek-anand at Acquia commentedThe pach with enhancements from approach mentioned in #comment-11821659
Comment #6
abhishek-anand CreditAttribution: abhishek-anand at Acquia commentedChanged the approach to use a parent-child relationship, so that there is only one parent process that invokes multiple child process, this will ensure there is not too many process waiting for other process to finish.
Comment #7
nielsvm CreditAttribution: nielsvm commentedPlease see 8.x-3.x branch for this!
Comment #8
nielsvm CreditAttribution: nielsvm commented