chore(api): add option to not add new jobs
This commit is contained in:
@@ -49,6 +49,8 @@ export async function postEvent(
|
||||
'NX',
|
||||
);
|
||||
|
||||
// TODO: remove this
|
||||
if (process.env.DISABLE_ADD_JOBS === undefined) {
|
||||
eventsQueue.add(
|
||||
'event',
|
||||
{
|
||||
@@ -74,6 +76,7 @@ export async function postEvent(
|
||||
delay: request.body.name === 'screen_view' ? undefined : 1000,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
reply.status(202).send('ok');
|
||||
}
|
||||
|
||||
@@ -247,6 +247,8 @@ async function track({
|
||||
'NX',
|
||||
);
|
||||
|
||||
// TODO: remove this
|
||||
if (process.env.DISABLE_ADD_JOBS === undefined) {
|
||||
eventsQueue.add(
|
||||
'event',
|
||||
{
|
||||
@@ -273,6 +275,7 @@ async function track({
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async function identify({
|
||||
payload,
|
||||
|
||||
Reference in New Issue
Block a user