Skip to content

Commit 3780529

Browse files
authored
Merge pull request #1574 from kirtangajjar/feature/migration-cache-remove
Remove migration retrigger prevention
2 parents 3efaf57 + 4110422 commit 3780529

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

php/EE/Migration/Executor.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public static function execute_migrations() {
3030
self::execute_migration_stack( $migrations );
3131
} catch ( \Throwable $e ) {
3232
Utils\delem_log( 'ee migration ended abruptly' );
33-
EE::get_cache()->remove( 'migration_running' );
3433
exit( 1 );
3534
}
3635

php/EE/Runner.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -868,26 +868,11 @@ private function auto_check_update() {
868868
*/
869869
private function maybe_trigger_migration() {
870870

871-
$cache = EE::get_cache();
872-
873-
/**
874-
* Below condition ensures that running EE::launch() or runcommand()
875-
* in migration file does not trigget migration again.
876-
*/
877-
if ( $cache->read( 'migration_running' ) ) {
878-
EE::debug( 'Not triggering migrations since they seems to already been running.' );
879-
return;
880-
}
881-
882-
$cache->write( 'migration_running', true );
883-
884871
$db_version = Option::get( 'version' );
885872
$current_version = EE_VERSION;
886873

887874
if ( ! $db_version ) {
888875
$this->trigger_migration( $current_version );
889-
$cache->remove( 'migration_running' );
890-
891876
return;
892877
}
893878

@@ -913,8 +898,6 @@ private function maybe_trigger_migration() {
913898
} elseif ( false !== strpos( $current_version, 'nightly' ) ) {
914899
$this->trigger_migration( $current_version );
915900
}
916-
917-
$cache->remove( 'migration_running' );
918901
}
919902

920903
private function trigger_migration( $version ) {

0 commit comments

Comments
 (0)