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 */
|
||||
async function runJob() {
|
||||
@@ -277,6 +276,7 @@ async function pushJob() {
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
initializeStream();
|
||||
try {
|
||||
await Promise.all([runJob(), pushJob()]);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user