master
Matthew 2022-10-10 16:05:35 -04:00
parent ca6e20fa0b
commit ab88fcfd58
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
2 changed files with 10 additions and 8 deletions

View File

@ -62,6 +62,7 @@ export default async function checkLock(client: Client) {
await start(); await start();
interval = setInterval(async () => { interval = setInterval(async () => {
await start(); await start();
}, 10000); // 1.2 minutes
}, 72000);
return interval; return interval;
} }

View File

@ -161,7 +161,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
await client.util.authClient.createUser({ await client.util.authClient.createUser({
email: acknowledgement.emailAddress, email: acknowledgement.emailAddress,
name: member.username, name: member.username,
user_id: `auth0|${member.id}`, user_id: `${member.id}`,
connection: 'Staff-Database', connection: 'Staff-Database',
email_verified: true, email_verified: true,
app_metadata: { app_metadata: {
@ -206,7 +206,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
await client.util.authClient.createUser({ await client.util.authClient.createUser({
email: acknowledgement.emailAddress, email: acknowledgement.emailAddress,
name: member.username, name: member.username,
user_id: `auth0|${member.id}`, user_id: `${member.id}`,
connection: 'Staff-Database', connection: 'Staff-Database',
email_verified: true, email_verified: true,
app_metadata: { app_metadata: {
@ -252,7 +252,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
await client.util.authClient.createUser({ await client.util.authClient.createUser({
email: acknowledgement.emailAddress, email: acknowledgement.emailAddress,
name: member.username, name: member.username,
user_id: `auth0|${member.id}`, user_id: `${member.id}`,
connection: 'Staff-Database', connection: 'Staff-Database',
email_verified: true, email_verified: true,
app_metadata: { app_metadata: {
@ -298,7 +298,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
await client.util.authClient.createUser({ await client.util.authClient.createUser({
email: acknowledgement.emailAddress, email: acknowledgement.emailAddress,
name: member.username, name: member.username,
user_id: `auth0|${member.id}`, user_id: `${member.id}`,
connection: 'Staff-Database', connection: 'Staff-Database',
email_verified: true, email_verified: true,
app_metadata: { app_metadata: {
@ -344,7 +344,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
await client.util.authClient.createUser({ await client.util.authClient.createUser({
email: acknowledgement.emailAddress, email: acknowledgement.emailAddress,
name: member.username, name: member.username,
user_id: `auth0|${member.id}`, user_id: `${member.id}`,
connection: 'Staff-Database', connection: 'Staff-Database',
email_verified: true, email_verified: true,
app_metadata: { app_metadata: {
@ -390,7 +390,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
await client.util.authClient.createUser({ await client.util.authClient.createUser({
email: acknowledgement.emailAddress, email: acknowledgement.emailAddress,
name: member.username, name: member.username,
user_id: `auth0|${member.id}`, user_id: `${member.id}`,
connection: 'Staff-Database', connection: 'Staff-Database',
email_verified: true, email_verified: true,
app_metadata: { app_metadata: {
@ -503,6 +503,7 @@ export default async function departmentPager(client: Client): Promise<NodeJS.Ti
client.util.signale.time('pagerint'); client.util.signale.time('pagerint');
await start(client); await start(client);
client.util.signale.timeEnd('pagerint'); client.util.signale.timeEnd('pagerint');
}, 300000); // 30 minutes
}, 60000 * 30);
return interval; return interval;
} }