bot-functions 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -909,11 +909,18 @@ const sendDataClickHouse = async (params, dataJSON) => {
|
|
|
909
909
|
return new Promise(async function (resolve, reject) {
|
|
910
910
|
actualFunction = "sendDataClickHouse";
|
|
911
911
|
try {
|
|
912
|
+
payload = {
|
|
913
|
+
params,
|
|
914
|
+
data: dataJSON
|
|
915
|
+
}
|
|
912
916
|
const batchPromises = [];
|
|
913
917
|
const stringData = JSON.stringify(dataJSON);
|
|
914
918
|
const response = await axios({
|
|
915
|
-
method: 'post',
|
|
916
|
-
|
|
919
|
+
method: 'post',
|
|
920
|
+
url: process.env.INSERT_CLICKHOUSE,
|
|
921
|
+
data: payload,
|
|
922
|
+
maxBodyLength: Infinity,
|
|
923
|
+
headers: { 'Accept': 'application/json', 'Content-Type': 'application/json'}
|
|
917
924
|
});
|
|
918
925
|
batchPromises.push(response.status);
|
|
919
926
|
batchPromises.map(reg => log.info('Insert status', reg));
|