-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISSUE-133: Make Hydroponics background processing multi child based #138
Conversation
8.x 1.0 beta1
8.x 1.0 beta1
8.x 1.0 beta1
8.x 1.0 beta2
Add schema for strawberryfield_textarea (#72)
Issue-71b: Add schema for strawberryfield_field itself! (#73)
8.x 1.0 beta3
8.x 1.0 beta3
1.0.0 rc1
Add second parameter to converter (esmero#102)
1.0.0 rc1
See esmero#107 Also moves some logic out of the caller into the call-ee so people like Born Digital can intersect the naming/affect/change and (maybe) use full OCFL. There is a HOOK there 👀 !!
First pass on making getDestinationUri() smarter
1.0.0 rc1
Issue 112
Gosh. Pushing
Do not over process. Key value == $item_id passed by tracker
1.0.0 rc1
1.0.0 rc1
Issue 121
1.0.0 rc1
1.0.0 rc1
1.0.0 rc1
1.0.0 rc1
Issue 131
Adds a verify Drush command
Issue 131
refactor drush command check for ubuntu
First pass: refresh button and some basic info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giancarlobi looking great. I added some minor comments on cleanup and may give all another pass to make sure we remove comments/etc.
Also some minor notes on configurations, like making the INTs instead of Strings for time based values
$heartbeat_max_delta = $this->getHearbeatMaxDelta(); | ||
|
||
$running_posix = FALSE; | ||
if ($queuerunner_pid > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if $queuerunner_pid is not >0? should we not stop processing and return immediately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, not clear to me what you mean.
if (extension_loaded('pcntl')) { | ||
$running_posix = posix_kill($queuerunner_pid, SIGTERM); | ||
$running_posix = posix_kill(abs($queuerunner_pid), SIGTERM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to have a comment somewhere like here https://github.com/esmero/strawberryfield/pull/138/files#diff-f87fbb18e8f039828bd65f2204e85b8a323c7f253f13ea2f5109174060aa3a4eR388 (every time we fetch the PID) explaining that if its negative means it was started? basically explain why you use negatives for tracking PIDS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a more verbose checkRunning result, see if what you mean or not, please
else { | ||
\Drupal::state()->set('hydroponics.queurunner_last_pid', 0); | ||
sleep(1); | ||
return "Successfully cleared pid. Thanks"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message and the way we return messages here is something I'm not totally convinced of
1.- Messages are not translated.
2.- We depend on a message to define if stopped worked? DO we need a also a status returned? We could use maybe instead a StdClass Object to make sending/returning of data easier like we do for the actual workers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DiegoPino As for checkRunning, stop function can return an array ['staus'] (TRUE all ok, FALSE for error) and ['message'] with text about result, what do you think?
@DiegoPino Thanks, I'll parse everything and make changes as for your notes. Not sure if today, probably tomorrow. Anyway we need a full check before merging, obviously. |
@giancarlobi I see all your changes, this is great! |
@DiegoPino I had some free relaxed time and started to make changes. Some left to solve, I hope later or tomorrow to complete all ... I hope |
@giancarlobi that works! Just for future compatibility its suggested (sorry, its only good practice) to use |
@DiegoPino i.e. as for \Psr\Log\LoggerInterface ? Thanks for note, I'll try to follow guide lines. Also today I learned something new, friend |
yes! True. |
wonderful! |
@giancarlobi first pass on code/sanity looks good! I need to now test with some data/actions and watch logs. What would you suggest is a good way of making sure all is working correctly? What is the the config equivalent of the old method (the simple one by one)? So I can compare? No rush. I will also do some small Drupal Coding Standard changes afterwards (probably a separate branch) so I do not interrupt your work here because I know you are busy. Basically I will create a RC2 copy branch and merge this against that one with each commit (not a squash) and apply the Coding standard changes (small really) to that one. Let me know if that works for you @giancarlobi. Good work!! |
Good morning @DiegoPino
The config as the old method is using "A single process for all queues" in setting admin/config/archipelago/hydroponics
Perfect, thanks !!! |
@giancarlobi merging into a local branch ISSUE-133 to apply tiny Drupal coding standards changes. Will preserve the full commit log! This should be "finally" ready from my part by tomorrow. Thank you again for all your patience friend! |
@DiegoPino don't worry, I'm happy with this. And thanks for your great work. |
@giancarlobi good morning there! (like 4AM I know). I'm testing and debugging your code right now and I very much like it! Its very efficient and verbose!! Sorry for the delay on testing but there are too many things on my plate and I really wanted to test this in detail since its core to Archipelago Right now I'm testing the Mono Command (HydroponicsDrushCommands) One thing I noticed is that we do not have the security timer anymore. Means it will run into it has no more queue items. I feels its the right thing but thinking of a special use case (Multisite on a smaller server) I would like to add it back as an option (checkbox) $security_time = 720.0;
$securitytimer = $loop->addTimer(720.0, function ($timer) use ($loop, $timer_ping, $idle_timer, &$done) {
// Finish all if 720 seconds are reached
\Drupal::logger('hydroponics')->info("720 seconds passed closing Hydroponics Service");
$loop->cancelTimer($timer_ping);
foreach($done as $queue_timer) {
$loop->cancelTimer($queue_timer);
}
\Drupal::state()->set('hydroponics.queurunner_last_pid', 0);
$loop->cancelTimer($idle_timer);
$loop->stop();
}
); Or, I should i add an extra time check inside $idle_timer = $loop->addPeriodicTimer($idle_timer_time, function ($timer) use ($loop, $timer_ping, &$done, &$idle) ? I may need your wise advice on this. |
@DiegoPino Sorry for my silence into Archipelago community, here really busy days, I hope to free me to the end of this week. Don't worry about your delay on this, I know you are really really multi-tasking !!! |
Hi Friend! Yes i love that idea. Will check the code and pass through your
eyes! No worries about silence, you are with us the whole time!
El El mié, 24 de feb. de 2021 a la(s) 08:09, Giancarlo <
notifications@github.com> escribió:
@DiegoPino <https://github.com/DiegoPino> Sorry for my silence into
Archipelago community, here really busy days, I hope to free me to the end
of this week. Don't worry about your delay on this, I know you are really
really multi-tasking !!!
About security timer, at first look I think is better add a check into
idle_timer than add an extra timer (we have to clear it before close and so
on).
We can simply count how many times idle_timer loop is executed and (if
enabled into config) close loop when N is reached. More or less time will
be N * 60s with current hard coded settings.
Whant do you think?
Take care friend
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#138 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABU7ZZ2NKM54NJZ6PRMYUZ3TAT27HANCNFSM4WCRS5FQ>
.
--
Diego Pino Navarro
Digital Repositories Developer
Metropolitan New York Library Council (METRO)
|
A lot of hydroponics improvements. See #133