File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed
Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 55}
66
77if ( ! defined ( 'EE_CRON_SCHEDULER ' ) ) {
8- define ( 'EE_CRON_SCHEDULER ' , 'ee-cron-scheduler ' );
8+ define ( 'EE_CRON_SCHEDULER ' , 'services_global-cron_1 ' );
99}
1010
1111$ autoload = dirname ( __FILE__ ) . '/vendor/autoload.php ' ;
Original file line number Diff line number Diff line change @@ -68,13 +68,7 @@ class Cron_Command extends EE_Command {
6868 */
6969 public function create ( $ args , $ assoc_args ) {
7070
71- if ( 'running ' !== EE_DOCKER ::container_status ( EE_CRON_SCHEDULER ) ) {
72- $ img_versions = \EE \Utils \get_image_versions ();
73- $ 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 ' ];
74- if ( ! EE_DOCKER ::boot_container ( EE_CRON_SCHEDULER , $ cron_scheduler_run_command ) ) {
75- EE ::error ( 'There was some error in starting ' . EE_CRON_SCHEDULER . ' container. Please check logs. ' );
76- }
77- }
71+ \EE \Service \Utils \init_global_container ( GLOBAL_CRON );
7872
7973 EE \Utils \delem_log ( 'ee cron add start ' );
8074
Original file line number Diff line number Diff line change 1111function update_cron_config () {
1212
1313 $ config = generate_cron_config ();
14- file_put_contents ( EE_ROOT_DIR . '/services/ cron/config.ini ' , $ config );
14+ file_put_contents ( EE_SERVICE_DIR . '/cron/conf /config.ini ' , $ config );
1515 \EE_DOCKER ::restart_container ( EE_CRON_SCHEDULER );
1616}
1717
You can’t perform that action at this time.
0 commit comments