Selaa lähdekoodia

Terminado sincronizado

ElPoteito 2 vuotta sitten
vanhempi
commit
d54db24877
2 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 3 3
      commands/EventoController.php
  2. 2 2
      config/db.php

+ 3 - 3
commands/EventoController.php

@@ -60,7 +60,7 @@ class EventoController extends Controller {
     do {
       $this->stdout("Sincronizando ...");
       $ref = $firestore->collection("eventos")
-        // ->where("sincronizado", "==", null)
+        ->where("sincronizado", "==", null)
         ->orderBy("timestamp", "ASC")
         ->limit($limite);
 
@@ -324,8 +324,8 @@ class EventoController extends Controller {
           $hoy = new \DateTime();
           $doc->reference()
             ->update([
-              ["path" => "sincronizado", "value" => null],
-              // ["path" => "sincronizadoFecha", "value" => $hoy->format("Y-m-d H:i:s")],
+              ["path" => "sincronizado", "value" => "OK"],
+              ["path" => "sincronizadoFecha", "value" => $hoy->format("Y-m-d H:i:s")],
             ]);
           $this->stdoutln("Sincronizado correcto");
         } catch (\Exception $e) {

+ 2 - 2
config/db.php

@@ -2,9 +2,9 @@
 
 return [
     'class' => 'yii\db\Connection',
-    'dsn' => 'pgsql:host=localhost;dbname=yager-local',
+    'dsn' => 'pgsql:host=172.30.241.3;dbname=yager',
     'username' => 'yager',
-    'password' => 'yager',
+    'password' => 'EsJ1k=eMmRZBA4b-',
     'charset' => 'utf8',
     // Schema cache options (for production environment)
     //'enableSchemaCache' => true,