Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inactive_user_workflow
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
inactive_user_workflow
Merge requests
!2
#3463392
Added better cron management
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
#3463392
Added better cron management
issue/inactive_user_workflow-3463392:3463392-better-cron-management
into
1.0.x
Overview
0
Commits
1
Pipelines
0
Changes
10
Open
Ivan Duarte
requested to merge
issue/inactive_user_workflow-3463392:3463392-better-cron-management
into
1.0.x
9 months ago
Overview
0
Commits
1
Pipelines
0
Changes
10
Expand
Improves the cron management
0
0
Merge request reports
Compare
1.0.x
1.0.x (HEAD)
and
latest version
latest version
ece2b961
1 commit,
9 months ago
10 files
+
296
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
10
Search (e.g. *.vue) (Ctrl+P)
src/Commands/InactiveUsersWorkflowCommands.php
0 → 100644
+
50
−
0
Options
<?php
namespace
Drupal\inactive_user_workflow\Commands
;
use
Drupal\Core\Messenger\MessengerInterface
;
use
Drush\Commands\DrushCommands
;
/**
* Drush 10 Inactive Users Workflow commands for Drupal Core 8.4+.
*/
class
InactiveUsersWorkflowCommands
extends
DrushCommands
{
/**
* The Messenger service.
*
* @var \Drupal\Core\Messenger\MessengerInterface
*/
protected
$messenger
;
/**
* InactiveUsersWorkflowCommands constructor.
*
* @param \Drupal\Core\Messenger\MessengerInterface $messenger
* Messenger service.
*/
public
function
__construct
(
MessengerInterface
$messenger
)
{
parent
::
__construct
();
$this
->
messenger
=
$messenger
;
}
/**
* Lightweight cron to process Inactive Users Workflow module tasks.
*
* @param array $options
* An associative array of options whose values come from cli, aliases,
* config, etc.
*
* @option nomsg
* to avoid the "cron completed" message being written to the terminal.
*
* @command inactive_user_workflow:cron
* @aliases inactive_user_workflow-cron, iuw-cron
*/
public
function
cron
(
array
$options
=
[
'nomsg'
=>
NULL
])
{
inactive_user_workflow_cron
();
$options
[
'nomsg'
]
?
NULL
:
$this
->
messenger
->
addMessage
(
dt
(
'Inactive Users Workflow lightweight cron completed.'
));
}
}
Loading