fix(tracker): testing
This commit is contained in:
parent
bc5228a931
commit
6c10d55236
2 changed files with 4 additions and 2 deletions
|
|
@ -183,7 +183,8 @@ export default class App {
|
|||
const batch = data.batch
|
||||
const batchSize = batch.byteLength
|
||||
console.log(batchSize)
|
||||
if (batchSize > 1000 * 10) {
|
||||
// 1000 * 10
|
||||
if (batchSize > 1) {
|
||||
gzip(data.batch, { mtime: 0 }, (err, result) => {
|
||||
if (err) console.error(err)
|
||||
this.worker?.postMessage({ type: 'compressed', batch: result })
|
||||
|
|
|
|||
|
|
@ -63,10 +63,11 @@ export default class QueueSender {
|
|||
fetch(this.ingestURL, {
|
||||
body: batch,
|
||||
method: 'POST',
|
||||
// @ts-ignore
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.token as string}`,
|
||||
//"Content-Type": "",
|
||||
// 'Content-Encoding': isCompressed ? 'gzip' : undefined,
|
||||
'Content-Encoding': isCompressed ? 'gzip' : undefined,
|
||||
},
|
||||
keepalive: batch.length < KEEPALIVE_SIZE_LIMIT,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue