Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cron-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
return;
}

if ( ! defined( 'EE_CRON_SERVICE' ) ) {
define( 'EE_CRON_SERVICE', 'global-cron' );
}

if ( ! defined( 'EE_CRON_SCHEDULER' ) ) {
define( 'EE_CRON_SCHEDULER', 'ee-cron-scheduler' );
define( 'EE_CRON_SCHEDULER', 'services_global-cron_1' );
}

$autoload = dirname( __FILE__ ) . '/vendor/autoload.php';
Expand Down
4 changes: 1 addition & 3 deletions src/Cron_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ class Cron_Command extends EE_Command {
public function create( $args, $assoc_args ) {

if ( 'running' !== EE_DOCKER::container_status( EE_CRON_SCHEDULER ) ) {
$img_versions = \EE\Utils\get_image_versions();
$cron_scheduler_run_command = 'docker run --name ' . EE_CRON_SCHEDULER . ' --restart=always -d -v ' . EE_ROOT_DIR . '/services/cron:/etc/ofelia:ro -v /var/run/docker.sock:/var/run/docker.sock:ro easyengine/cron:' . $img_versions['easyengine/cron'];
if ( ! EE_DOCKER::boot_container( EE_CRON_SCHEDULER, $cron_scheduler_run_command ) ) {
if ( ! \EE\Service\Utils\init_global_container( EE_CRON_SERVICE ) ) {
EE::error( 'There was some error in starting ' . EE_CRON_SCHEDULER . ' container. Please check logs.' );
}
}
Expand Down