feature(queue): use postgres instead of redis for buffer
* wip(buffer): initial implementation of psql buffer * wip(buffer): add both profile and bots buffer
This commit is contained in:
committed by
Carl-Gerhard Lindesvärd
parent
2b5b8ce446
commit
71bf22af51
@@ -184,6 +184,9 @@ async function createMock(file: string) {
|
||||
data: {
|
||||
organizationId: 'openpanel-dev',
|
||||
name: project.domain,
|
||||
cors: [project.domain],
|
||||
domain: project.domain,
|
||||
crossDomain: true,
|
||||
clients: {
|
||||
create: {
|
||||
organizationId: 'openpanel-dev',
|
||||
@@ -191,7 +194,6 @@ async function createMock(file: string) {
|
||||
secret: await hashPassword('secret'),
|
||||
id: project.clientId,
|
||||
type: ClientType.write,
|
||||
cors: project.domain,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -255,6 +257,10 @@ async function simultaneousRequests() {
|
||||
trackit(screenView);
|
||||
trackit(event);
|
||||
}
|
||||
const exit = async () => {
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
process.exit(1);
|
||||
};
|
||||
|
||||
async function main() {
|
||||
const [type, file = 'mock-basic.json'] = process.argv.slice(2);
|
||||
@@ -268,10 +274,10 @@ async function main() {
|
||||
break;
|
||||
case 'mock':
|
||||
await createMock(file);
|
||||
await exit();
|
||||
break;
|
||||
default:
|
||||
console.log('usage: jiti mock.ts send|mock|sim [file]');
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user