Refactoring (2)
This commit is contained in:
2
index.ts
2
index.ts
@@ -242,7 +242,6 @@ function initializeStream() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
initializeStream();
|
|
||||||
|
|
||||||
/** pop from the job queue and run it */
|
/** pop from the job queue and run it */
|
||||||
async function runJob() {
|
async function runJob() {
|
||||||
@@ -277,6 +276,7 @@ async function pushJob() {
|
|||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
try {
|
try {
|
||||||
|
initializeStream();
|
||||||
try {
|
try {
|
||||||
await Promise.all([runJob(), pushJob()]);
|
await Promise.all([runJob(), pushJob()]);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user