Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
provision-3216405
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
Issue forks
provision-3216405
Commits
82a0cb8a
Commit
82a0cb8a
authored
16 years ago
by
Adrian Rossouw
Committed by
adrian
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add provision cron command
parent
215a4e74
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
provision.module
+23
-0
23 additions, 0 deletions
provision.module
with
23 additions
and
0 deletions
provision.module
+
23
−
0
View file @
82a0cb8a
...
...
@@ -25,6 +25,7 @@
* enable - Re-enable a site that has already been disabled. Recreates the virtual host file.
* delete - Generates a back up of the site, and then removes all references to it.
* restore - Revert to a previous backup of the site.
* cron - Run cron process for a site
*
* Not implemented yet :
* upgrade - Accepts a site package (backup) as argument, and redeploys it, running the upgrade processes on it.
...
...
@@ -349,6 +350,12 @@ function provision_drush_command() {
'description'
=>
'Delete a site.'
);
$items
[
'provision cron'
]
=
array
(
'callback'
=>
'_provision_cron'
,
'description'
=>
'Run cron process for site.'
,
'arguments'
=>
array
(
'domain.com'
=>
t
(
'The domain of the site to be processed'
))
);
if
(
!
function_exists
(
'hosting_setup'
))
{
$items
[
'provision setup'
]
=
array
(
'callback'
=>
'_provision_setup_cmd'
,
...
...
@@ -789,3 +796,19 @@ function _provision_setup_cmd() {
print
"
\n
The command did not complete successfully, please fix the issues and re-run this script."
;
}
}
/**
* Drush command to run cron
*/
function
_provision_cron
(
$url
)
{
if
(
!
_provision_drupal_site_installed
(
$url
))
{
provision_log
(
"Error"
,
"Site has not been installed yet."
);
provision_set_error
(
PROVISION_SITE_NOT_FOUND
);
provision_output
(
$url
,
$data
);
}
$data
=
provision_get_site_data
(
$url
);
_provision_drupal_switch_active_site
(
$url
);
drupal_cron_run
();
_provision_drupal_switch_active_site
();
}
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