diff --git a/include/config/config.xml b/include/config/config.xml
index dfbd9808b..0d82e8d64 100755
--- a/include/config/config.xml
+++ b/include/config/config.xml
@@ -166,8 +166,8 @@
5
3
60000
- 20000
- 30000
+ 30000
+ 20000
300000
120000
120000
diff --git a/include/library/Cana.php b/include/library/Cana.php
index 6f0cb8509..89fe654c1 100755
--- a/include/library/Cana.php
+++ b/include/library/Cana.php
@@ -156,6 +156,8 @@ class Cana extends Cana_Model {
$cmd = c::config()->dirs->root.'cli/timeout.php'.$sleep.' -c='.str_replace("'",'"',escapeshellarg($encoded));
+ Log::debug( [ 'cmd' => $cmd, 'type' => 'timer' ]);
+
if ($async) {
exec('nohup '.$cmd.' > /dev/null 2>&1 &');
} else {
diff --git a/include/library/Crunchbutton/Order.php b/include/library/Crunchbutton/Order.php
index 7e6832725..63c421c97 100644
--- a/include/library/Crunchbutton/Order.php
+++ b/include/library/Crunchbutton/Order.php
@@ -254,6 +254,7 @@ class Crunchbutton_Order extends Cana_Table {
$this->date = date('Y-m-d H:i:s');
$this->id_community = $this->restaurant()->community()->id_community;
$this->save();
+
$this->que();
$this->debitFromUserCredit();
@@ -609,10 +610,12 @@ class Crunchbutton_Order extends Cana_Table {
// Start the timer to check if the order was confirmed. #1049
if ($this->restaurant()->confirmation) {
- Log::debug( [ 'order' => $order->id_order, 'action' => 'que warningOrderNotConfirmed started', 'time' => c::config()->twilio->warningOrderNotConfirmedTime, 'type' => 'notification' ]);
+ $timer = c::config()->twilio->warningOrderNotConfirmedTime;
+ // Log
+ Log::debug( [ 'order' => $order->id_order, 'action' => 'que warningOrderNotConfirmed started', 'time' => $timer, 'type' => 'notification' ]);
c::timeout(function() use($order) {
$order->warningOrderNotConfirmed();
- }, c::config()->twilio->warningOrderNotConfirmedTime, false );
+ }, $timer );
}
}