Skip to content

occ commands to manage the job list#24551

Closed
DeepDiver1975 wants to merge 1 commit into
masterfrom
stand-alone-job-executer
Closed

occ commands to manage the job list#24551
DeepDiver1975 wants to merge 1 commit into
masterfrom
stand-alone-job-executer

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented May 11, 2016

Copy link
Copy Markdown
Member

ToDo:

  • introduce select for update table lock in query builder
  • use select for update to lock selected job
  • add state update call to the job queue to mark job as selected by executor
  • add occ command to remove jobs from the queue

@DeepDiver1975 DeepDiver1975 added this to the 9.1-current milestone May 11, 2016
@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @nickvergessen, @icewind1991 and @blizzz to be potential reviewers

@DeepDiver1975 DeepDiver1975 force-pushed the stand-alone-job-executer branch from 26e2d12 to 79d669c Compare May 17, 2016 09:34
@nickvergessen

Copy link
Copy Markdown
Contributor

introduce select for update in query builder

I looked a bit into SELECT ... FOR UPDATE. I assume you want to use it in lib/private/BackgroundJob/JobList.php to get the new job and lock the row until you wrote the reserved flag to the database?

@DeepDiver1975

Copy link
Copy Markdown
Member Author

I assume you want to use it in lib/private/BackgroundJob/JobList.php to get the new job and lock the row until you wrote the reserved flag to the database?

exactly

@PVince81

Copy link
Copy Markdown
Contributor

@nickvergessen please update status, PR was merged. Raise doc / QA tickets if applicable.
Thanks

@nickvergessen

Copy link
Copy Markdown
Contributor

Done, didn't update this PR, the worker still looks good, but the table change of course is in conflict now.

@DeepDiver1975 DeepDiver1975 force-pushed the stand-alone-job-executer branch 2 times, most recently from d639831 to 4dbf074 Compare May 29, 2016 19:44
@DeepDiver1975 DeepDiver1975 changed the title [WIP] stand alone job executor process stand alone job executor process May 30, 2016
@PVince81

Copy link
Copy Markdown
Contributor

We're past feature freeze, move to 9.2 ? @DeepDiver1975 @nickvergessen

@DeepDiver1975 DeepDiver1975 modified the milestones: 9.2-next, 9.1-current May 31, 2016
@DeepDiver1975

Copy link
Copy Markdown
Member Author

We're past feature freeze, move to 9.2 ? @DeepDiver1975 @nickvergessen

agreed

@DeepDiver1975 DeepDiver1975 force-pushed the stand-alone-job-executer branch from 4dbf074 to d1d3b1e Compare July 1, 2016 10:14
@PVince81

Copy link
Copy Markdown
Contributor

Is there still interest in getting this feature finished ?

Not sure how this fits in with the latest changes with bkg jobs

@PVince81

PVince81 commented Apr 6, 2017

Copy link
Copy Markdown
Contributor

moving to backlog for now unless there is interest and time in reviving this soon and getting it completed

@PVince81 PVince81 modified the milestones: backlog, 10.0 Apr 6, 2017
@DeepDiver1975 DeepDiver1975 changed the title stand alone job executor process occ commands to manage the job list Jul 19, 2017
@DeepDiver1975 DeepDiver1975 self-assigned this Jul 19, 2017
@DeepDiver1975 DeepDiver1975 force-pushed the stand-alone-job-executer branch from 903148e to 887821d Compare July 19, 2017 10:35
$this->logger = new CommandLogger($output);

$waitTime = $input->getOption('sleep');
while (true) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea how this is expected to be executed? I'm not fan of infinite loops without any escape route, and if this is going to be run as a service the only way to stop the loop would be kill it with fire (aka, sigkill signal).

I think it would be good to capture signals if possible in order to try to make a smooth exit if possible. While this is possible in between the jobs during the sleep time, the challenge is to send some kind of notice to the background job in order to stop it nicely, otherwise the execution thread will likely be running inside the background job without any chance to process the incomming signal, which will lead to the admin to kill the process forcefully.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signal handling has need added

protected function execute(InputInterface $input, OutputInterface $output) {
$this->logger = new CommandLogger($output);

$waitTime = $input->getOption('sleep');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should force a minimum value. I'm not sure if setting a value of 0 will keep the CPU running near 100%

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed - there is a minimum of 1 now

@DeepDiver1975

Copy link
Copy Markdown
Member Author

@ownclouders rebase

@ownclouders

Copy link
Copy Markdown
Contributor

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

@ownclouders

Copy link
Copy Markdown
Contributor

Automated rebase with GitMate.io was successful! 🎉

@DeepDiver1975

Copy link
Copy Markdown
Member Author

@ownclouders rebase

@ownclouders

Copy link
Copy Markdown
Contributor

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

@ownclouders

Copy link
Copy Markdown
Contributor

Automated rebase with GitMate.io was successful! 🎉

@ownclouders ownclouders force-pushed the stand-alone-job-executer branch from 71a5414 to f274363 Compare April 19, 2018 12:57
@DeepDiver1975

Copy link
Copy Markdown
Member Author

use owncloud/market#86 which introduces a command to download the latest revocation list from the marketplace.

@mmattel

mmattel commented Jun 12, 2018

Copy link
Copy Markdown
Contributor

@DeepDiver1975 Is thisPR still valid?

Linking:

Merged: #31630 (Adding background:queue commands: status and delete)
and
Open: #31617 (Add background:execute occ command for running cron jobs manually)

@tomneedham

Copy link
Copy Markdown
Contributor

No longer relevant, obsolete

@tomneedham tomneedham closed this Jun 12, 2018
@DeepDiver1975 DeepDiver1975 deleted the stand-alone-job-executer branch June 12, 2018 11:02
@lock

lock Bot commented Jul 31, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants