Skip to content

Commit

Permalink
No checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberpower678 committed Jun 2, 2023
1 parent 8fb73aa commit 94cbabe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/src/Core/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ public function __construct( API $commObject ) {
}

public static function getCheckpoint( $force = false ) {
if( defined( 'NOCHECKPOINT' ) ) return [];

if( empty( self::$checkPoint ) || $force ) {
if( empty( UNIQUEID ) ) $query =
"SELECT * FROM externallinks_checkpoints WHERE wiki = '" . WIKIPEDIA . "';";
Expand Down Expand Up @@ -184,6 +186,8 @@ public static function getCheckpoint( $force = false ) {
}

public static function checkpointCheckRun() {
if( defined( 'NOCHECKPOINT' ) ) return true;

$checkpoint = self::getCheckpoint();

if( $checkpoint['run_state'] == 1 ) return true;
Expand All @@ -204,6 +208,8 @@ public static function checkpointCheckRun() {
}

public static function checkpointEndRun() {
if( defined( 'NOCHECKPOINT' ) ) return true;

$checkpoint = self::getCheckpoint();

$query =
Expand All @@ -218,6 +224,8 @@ public static function checkpointEndRun() {
}

public static function setCheckpoint( $data ) {
if( defined( 'NOCHECKPOINT' ) ) return true;

$checkpoint = self::getCheckpoint();

$query = "UPDATE externallinks_checkpoints SET";
Expand Down
1 change: 1 addition & 0 deletions app/src/html/guiworker.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
}

define( 'USEWEBINTERFACE', 0 );
define( 'NOCHECKPOINT', 1 );

require_once( 'loader.php' );

Expand Down

0 comments on commit 94cbabe

Please sign in to comment.