Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
6c825ee9
Unverified
Commit
6c825ee9
authored
4 years ago
by
Morris Jobke
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #21665 from nextcloud/debt/noid/job-list
Fix wrong phpdoc for execute method
parents
2a0c7e25
b1cdd0dd
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/private/BackgroundJob/Job.php
+7
-16
7 additions, 16 deletions
lib/private/BackgroundJob/Job.php
lib/private/BackgroundJob/TimedJob.php
+2
-1
2 additions, 1 deletion
lib/private/BackgroundJob/TimedJob.php
lib/public/BackgroundJob/IJob.php
+4
-6
4 additions, 6 deletions
lib/public/BackgroundJob/IJob.php
with
13 additions
and
23 deletions
lib/private/BackgroundJob/Job.php
+
7
−
16
View file @
6c825ee9
...
@@ -28,29 +28,20 @@
...
@@ -28,29 +28,20 @@
namespace
OC\BackgroundJob
;
namespace
OC\BackgroundJob
;
use
OCP\BackgroundJob\IJob
;
use
OCP\BackgroundJob\IJob
;
use
OCP\BackgroundJob\IJobList
;
use
OCP\ILogger
;
use
OCP\ILogger
;
abstract
class
Job
implements
IJob
{
abstract
class
Job
implements
IJob
{
/**
/** @var int */
* @var int $id
*/
protected
$id
;
protected
$id
;
/**
/** @var int */
* @var int $lastRun
*/
protected
$lastRun
;
protected
$lastRun
;
/**
/** @var mixed */
* @var mixed $argument
*/
protected
$argument
;
protected
$argument
;
/**
public
function
execute
(
IJobList
$jobList
,
ILogger
$logger
=
null
)
{
* @param JobList $jobList
* @param ILogger|null $logger
*/
public
function
execute
(
$jobList
,
ILogger
$logger
=
null
)
{
$jobList
->
setLastRun
(
$this
);
$jobList
->
setLastRun
(
$this
);
if
(
$logger
===
null
)
{
if
(
$logger
===
null
)
{
$logger
=
\OC
::
$server
->
getLogger
();
$logger
=
\OC
::
$server
->
getLogger
();
...
@@ -76,11 +67,11 @@ abstract class Job implements IJob {
...
@@ -76,11 +67,11 @@ abstract class Job implements IJob {
abstract
protected
function
run
(
$argument
);
abstract
protected
function
run
(
$argument
);
public
function
setId
(
$id
)
{
public
function
setId
(
int
$id
)
{
$this
->
id
=
$id
;
$this
->
id
=
$id
;
}
}
public
function
setLastRun
(
$lastRun
)
{
public
function
setLastRun
(
int
$lastRun
)
{
$this
->
lastRun
=
$lastRun
;
$this
->
lastRun
=
$lastRun
;
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/private/BackgroundJob/TimedJob.php
+
2
−
1
View file @
6c825ee9
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
namespace
OC\BackgroundJob
;
namespace
OC\BackgroundJob
;
use
OCP\BackgroundJob\IJobList
;
use
OCP\ILogger
;
use
OCP\ILogger
;
/**
/**
...
@@ -49,7 +50,7 @@ abstract class TimedJob extends Job {
...
@@ -49,7 +50,7 @@ abstract class TimedJob extends Job {
/**
/**
* run the job if
* run the job if
*
*
* @param JobList $jobList
* @param
I
JobList $jobList
* @param ILogger|null $logger
* @param ILogger|null $logger
*/
*/
public
function
execute
(
$jobList
,
ILogger
$logger
=
null
)
{
public
function
execute
(
$jobList
,
ILogger
$logger
=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/public/BackgroundJob/IJob.php
+
4
−
6
View file @
6c825ee9
...
@@ -38,23 +38,21 @@ interface IJob {
...
@@ -38,23 +38,21 @@ interface IJob {
/**
/**
* Run the background job with the registered argument
* Run the background job with the registered argument
*
*
* @param
\OCP\BackgroundJob\
IJobList $jobList The job list that manages the state of this job
* @param IJobList $jobList The job list that manages the state of this job
* @param ILogger|null $logger
* @param ILogger|null $logger
* @since 7.0.0
* @since 7.0.0
*/
*/
public
function
execute
(
$jobList
,
ILogger
$logger
=
null
);
public
function
execute
(
IJobList
$jobList
,
ILogger
$logger
=
null
);
/**
/**
* @param int $id
* @since 7.0.0
* @since 7.0.0
*/
*/
public
function
setId
(
$id
);
public
function
setId
(
int
$id
);
/**
/**
* @param int $lastRun
* @since 7.0.0
* @since 7.0.0
*/
*/
public
function
setLastRun
(
$lastRun
);
public
function
setLastRun
(
int
$lastRun
);
/**
/**
* @param mixed $argument
* @param mixed $argument
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment