Added test script for creating mass scans
This commit is contained in:
parent
23fa78eb9d
commit
8007117434
|
@ -0,0 +1,17 @@
|
|||
import axios from 'axios';
|
||||
|
||||
async function main() {
|
||||
for (let i = 0; i < 100; i++) {
|
||||
const batch = [];
|
||||
for (let i = 0; i < 20; i++) {
|
||||
batch.push(axios.post('http://localhost:4010/api/scans/trackscans', { card: 200000000001, station: 2 }, {
|
||||
headers: {
|
||||
Authorization: 'Bearer 10F2E64.BB4F6CC5-2148-4CCF-88B5-0AA85D0508A9'
|
||||
}
|
||||
}))
|
||||
}
|
||||
await Promise.all(batch)
|
||||
console.log(`Finished batch ${i}`)
|
||||
}
|
||||
}
|
||||
main();
|
Loading…
Reference in New Issue