Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
d0bbd941
Commit
d0bbd941
authored
12 years ago
by
Jakob Sack
Browse files
Options
Downloads
Patches
Plain Diff
Add BackgroundJob::setExecutionType() to public API
parent
f5f204de
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/backgroundjob.php
+7
-7
7 additions, 7 deletions
lib/backgroundjob.php
lib/public/backgroundjob.php
+23
-0
23 additions, 0 deletions
lib/public/backgroundjob.php
with
30 additions
and
7 deletions
lib/backgroundjob.php
+
7
−
7
View file @
d0bbd941
...
...
@@ -25,25 +25,25 @@
*/
class
OC_BackgroundJob
{
/**
* @brief get the type of background jobs
* @brief get the
execution
type of background jobs
* @return string
*
* This method returns the type how background jobs are executed. If the user
* did not select something, the type is ajax.
*/
public
static
function
getType
()
{
public
static
function
get
Execution
Type
()
{
return
OC_Appconfig
::
getValue
(
'core'
,
'backgroundjobs_mode'
,
'ajax'
);
}
/**
* @brief sets the background jobs type
* @param $type
type of background jobs
* @brief sets the background jobs
execution
type
* @param $type
execution type
* @return boolean
*
* This method sets the type of the background jobs. Possible types
are
* "none", "ajax", "webcron", "cron"
* This method sets the
execution
type of the background jobs. Possible types
*
are
"none", "ajax", "webcron", "cron"
*/
public
static
function
setType
(
$type
)
{
public
static
function
set
Execution
Type
(
$type
)
{
if
(
!
in_array
(
$type
,
array
(
'none'
,
'ajax'
,
'webcron'
,
'cron'
))){
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
lib/public/backgroundjob.php
+
23
−
0
View file @
d0bbd941
...
...
@@ -46,6 +46,29 @@ namespace OCP;
* is done it will be deleted from the list.
*/
class
BackgroundJob
{
/**
* @brief get the execution type of background jobs
* @return string
*
* This method returns the type how background jobs are executed. If the user
* did not select something, the type is ajax.
*/
public
static
function
getExecutionType
()
{
return
\OC_BackgroundJob
::
getExecutionType
();
}
/**
* @brief sets the background jobs execution type
* @param $type execution type
* @return boolean
*
* This method sets the execution type of the background jobs. Possible types
* are "none", "ajax", "webcron", "cron"
*/
public
static
function
setExecutionType
(
$type
)
{
return
\OC_BackgroundJob
::
setExecutionType
(
$type
);
}
/**
* @brief creates a regular task
* @param $klass class name
...
...
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