+orderHistory agent
This commit is contained in:
parent
1d611ef2f7
commit
0ce0403311
@ -452,6 +452,18 @@ class ICrmOrderActions
|
|||||||
return 'ICrmOrderActions::uploadOrdersAgent();';
|
return 'ICrmOrderActions::uploadOrdersAgent();';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Agent function
|
||||||
|
*
|
||||||
|
* @return self name
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static function orderHistoryAgent() {
|
||||||
|
self::orderHistory();
|
||||||
|
return 'ICrmOrderActions::orderHistoryAgent();';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* creates order or returns array of order and customer for mass upload
|
* creates order or returns array of order and customer for mass upload
|
||||||
|
@ -906,10 +906,7 @@ class intaro_intarocrm extends CModule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//agents
|
||||||
|
|
||||||
//agent
|
|
||||||
|
|
||||||
$dateAgent = new DateTime();
|
$dateAgent = new DateTime();
|
||||||
$intAgent = new DateInterval('PT60S'); // PT60S - 60 sec;
|
$intAgent = new DateInterval('PT60S'); // PT60S - 60 sec;
|
||||||
$dateAgent->add($intAgent);
|
$dateAgent->add($intAgent);
|
||||||
@ -924,6 +921,17 @@ class intaro_intarocrm extends CModule
|
|||||||
$dateAgent->format('d.m.Y H:i:s'), // date of first start
|
$dateAgent->format('d.m.Y H:i:s'), // date of first start
|
||||||
30
|
30
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CAgent::AddAgent(
|
||||||
|
"ICrmOrderActions::orderHistoryAgent();",
|
||||||
|
$this->MODULE_ID,
|
||||||
|
"N",
|
||||||
|
600, // interval - 10 mins
|
||||||
|
$dateAgent->format('d.m.Y H:i:s'), // date of first check
|
||||||
|
"Y", // агент активен
|
||||||
|
$dateAgent->format('d.m.Y H:i:s'), // date of first start
|
||||||
|
30
|
||||||
|
);
|
||||||
|
|
||||||
$api_host = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_HOST_OPTION, 0);
|
$api_host = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_HOST_OPTION, 0);
|
||||||
$api_key = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_KEY_OPTION, 0);
|
$api_key = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_KEY_OPTION, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user