Skip to content

Commit ddf37ed

Browse files
committed
cron: tweak to go to production
1 parent 9ea2baa commit ddf37ed

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

oit.module

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,7 @@ function oit_cron() {
617617
$env = getenv('PANTHEON_ENVIRONMENT');
618618
$save_state = 0;
619619

620-
// if ((date('G', time()) == 23) && ($env == 'live')) {
621-
if ((date('G', time()) == 23) && ($env == 'dev')) {
620+
if ((date('G', time()) == 23) && ($env == 'live')) {
622621
// Reset cron run state after 11PM.
623622
$cron_run = [
624623
'analytics' => 1,
@@ -642,6 +641,8 @@ function oit_cron() {
642641

643642
$cron_run['analytics'] = 0;
644643
$save_state = 1;
644+
645+
\Drupal::service('oit.teamsalert')->sendMessage('Cron: analytics ran');
645646
}
646647
elseif ($cron_run['autoban']) {
647648
// Send service alert message when new banned ip is added.
@@ -654,6 +655,8 @@ function oit_cron() {
654655

655656
$cron_run['autoban'] = 0;
656657
$save_state = 1;
658+
659+
\Drupal::service('oit.teamsalert')->sendMessage('Cron: autoban ran');
657660
}
658661
elseif ($cron_run['top_services']) {
659662
\Drupal::service('oit.toppages')->getTopPages();

0 commit comments

Comments
 (0)