partial #1049
This commit is contained in:
parent
12c57a2276
commit
dd23721c06
@ -166,8 +166,8 @@
|
|||||||
<maxcallback>5</maxcallback>
|
<maxcallback>5</maxcallback>
|
||||||
<maxconfirmback>3</maxconfirmback>
|
<maxconfirmback>3</maxconfirmback>
|
||||||
<warningOrderNotConfirmedTime>60000</warningOrderNotConfirmedTime><!-- 600000 -->
|
<warningOrderNotConfirmedTime>60000</warningOrderNotConfirmedTime><!-- 600000 -->
|
||||||
<confirmTime>20000</confirmTime>
|
<confirmTime>30000</confirmTime>
|
||||||
<confirmFaxTime>30000</confirmFaxTime>
|
<confirmFaxTime>20000</confirmFaxTime>
|
||||||
<confirmTimeFaxReceived>300000</confirmTimeFaxReceived>
|
<confirmTimeFaxReceived>300000</confirmTimeFaxReceived>
|
||||||
<confirmTimeCallback>120000</confirmTimeCallback>
|
<confirmTimeCallback>120000</confirmTimeCallback>
|
||||||
<callbackTime>120000</callbackTime>
|
<callbackTime>120000</callbackTime>
|
||||||
|
|||||||
@ -156,6 +156,8 @@ class Cana extends Cana_Model {
|
|||||||
|
|
||||||
$cmd = c::config()->dirs->root.'cli/timeout.php'.$sleep.' -c='.str_replace("'",'"',escapeshellarg($encoded));
|
$cmd = c::config()->dirs->root.'cli/timeout.php'.$sleep.' -c='.str_replace("'",'"',escapeshellarg($encoded));
|
||||||
|
|
||||||
|
Log::debug( [ 'cmd' => $cmd, 'type' => 'timer' ]);
|
||||||
|
|
||||||
if ($async) {
|
if ($async) {
|
||||||
exec('nohup '.$cmd.' > /dev/null 2>&1 &');
|
exec('nohup '.$cmd.' > /dev/null 2>&1 &');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -254,6 +254,7 @@ class Crunchbutton_Order extends Cana_Table {
|
|||||||
$this->date = date('Y-m-d H:i:s');
|
$this->date = date('Y-m-d H:i:s');
|
||||||
$this->id_community = $this->restaurant()->community()->id_community;
|
$this->id_community = $this->restaurant()->community()->id_community;
|
||||||
$this->save();
|
$this->save();
|
||||||
|
|
||||||
$this->que();
|
$this->que();
|
||||||
|
|
||||||
$this->debitFromUserCredit();
|
$this->debitFromUserCredit();
|
||||||
@ -609,10 +610,12 @@ class Crunchbutton_Order extends Cana_Table {
|
|||||||
|
|
||||||
// Start the timer to check if the order was confirmed. #1049
|
// Start the timer to check if the order was confirmed. #1049
|
||||||
if ($this->restaurant()->confirmation) {
|
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) {
|
c::timeout(function() use($order) {
|
||||||
$order->warningOrderNotConfirmed();
|
$order->warningOrderNotConfirmed();
|
||||||
}, c::config()->twilio->warningOrderNotConfirmedTime, false );
|
}, $timer );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user