mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-03-01 15:37:30 +00:00
Merge branch 'master' into eslit/fixed-lint-notebook-utils
This commit is contained in:
commit
702116dca1
@ -288,7 +288,6 @@ src/applyExplorerBindings.ts
|
||||
src/global.d.ts
|
||||
src/quickstart.ts
|
||||
src/setupTests.ts
|
||||
src/workers/upload/definitions.ts
|
||||
src/workers/upload/index.ts
|
||||
src/Explorer/Controls/AccessibleElement/AccessibleElement.tsx
|
||||
src/Explorer/Controls/Accordion/AccordionComponent.tsx
|
||||
|
@ -9,7 +9,7 @@ const tenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47";
|
||||
const subscriptionId = "69e02f2d-f059-4409-9eac-97e8a276ae2c";
|
||||
const resourceGroupName = "runners";
|
||||
|
||||
const twentyMinutesAgo = new Date(Date.now() - 1000 * 60 * 20).getTime();
|
||||
const sixtyMinutesAgo = new Date(Date.now() - 1000 * 60 * 60).getTime();
|
||||
|
||||
// Deletes all SQL and Mongo databases created more than 20 minutes ago in the test runner accounts
|
||||
async function main() {
|
||||
@ -21,7 +21,7 @@ async function main() {
|
||||
const mongoDatabases = await client.mongoDBResources.listMongoDBDatabases(resourceGroupName, account.name);
|
||||
for (const database of mongoDatabases) {
|
||||
const timestamp = Number(database.name.split("-")[1]);
|
||||
if (timestamp || timestamp < twentyMinutesAgo) {
|
||||
if (timestamp && timestamp < sixtyMinutesAgo) {
|
||||
await client.mongoDBResources.deleteMongoDBDatabase(resourceGroupName, account.name, database.name);
|
||||
console.log(`DELETED: ${account.name} | ${database.name} | Age: ${ms(Date.now() - timestamp)}`);
|
||||
} else {
|
||||
@ -32,7 +32,7 @@ async function main() {
|
||||
const sqlDatabases = await client.sqlResources.listSqlDatabases(resourceGroupName, account.name);
|
||||
for (const database of sqlDatabases) {
|
||||
const timestamp = Number(database.name.split("-")[1]);
|
||||
if (timestamp || timestamp < twentyMinutesAgo) {
|
||||
if (timestamp && timestamp < sixtyMinutesAgo) {
|
||||
await client.sqlResources.deleteSqlDatabase(resourceGroupName, account.name, database.name);
|
||||
console.log(`DELETED: ${account.name} | ${database.name} | Age: ${ms(Date.now() - timestamp)}`);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user