This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"label": "DEFAULT_ADMIN_PERMISSION", | |
"roles": [ | |
"license.collaborators.delete", | |
"license.collaborators.invite", | |
"license.collaborators.read", | |
"license.collaborators.update", | |
"license.delete", | |
"license.delete.ads", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const worker = async (queue, concurrency = 25) => { | |
let index = 0; | |
let results = []; | |
let threads = []; | |
const execThread = async () => { | |
while (index < queue.length) { | |
const currentIndex = index++; | |
// Use of `currentIndex` is important because `index` may change after await is resolved |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const putData = async (data, ms) => { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(data); | |
}, ms); | |
}); | |
}; | |
const clearAll = async () => { | |
// logic to clear all data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const putData = async (data, ms) => { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(data); | |
}, ms); | |
}); | |
}; | |
const clearAll = async () => { | |
// logic to clear all data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const putData = async (data, ms) => { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(data); | |
}, ms); | |
}); | |
}; | |
const [ | |
result1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const putData = async (data, ms) => { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(data); | |
}, ms); | |
}); | |
}; | |
const [ | |
result1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const graphql = require('graphql'); | |
const _ = require('lodash'); | |
const constants = require('../constants'); | |
const { | |
parse, | |
validate, | |
validateSchema, | |
execute, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const workerThreads = require('worker_threads'); | |
const rx = require('rxjs'); | |
class Worker { | |
constructor(file, data) { | |
this.messageId = 0; | |
this.callbacks = new Map(); | |
this.client = new workerThreads.Worker(file, { | |
workerData: { | |
id: Date.now(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"workbench.colorCustomizations": { | |
"[Monokai]": { | |
"activityBar.background": "#17191a", | |
"activityBar.border": "#363738", | |
"badge.background": "#17191a", | |
"editor.background": "#26292e", | |
"editorGroupHeader.tabsBackground": "#17191a", | |
"editorHoverWidget.background": "#17191a", | |
"editorHoverWidget.border": "#363738", | |
"focusBorder": "#00000000", |
NewerOlder