Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3365886
D10177.id34235.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D10177.id34235.diff
View Options
diff --git a/keyserver/src/scripts/add-leave-thread-permissions.js b/keyserver/src/scripts/add-leave-thread-permissions.js
--- a/keyserver/src/scripts/add-leave-thread-permissions.js
+++ b/keyserver/src/scripts/add-leave-thread-permissions.js
@@ -29,4 +29,4 @@
await dbQuery(updateAllRoles);
}
-main();
+void main();
diff --git a/keyserver/src/scripts/create-friend-relationships.js b/keyserver/src/scripts/create-friend-relationships.js
--- a/keyserver/src/scripts/create-friend-relationships.js
+++ b/keyserver/src/scripts/create-friend-relationships.js
@@ -28,4 +28,4 @@
await createUndirectedRelationships(result, undirectedStatus.FRIEND);
}
-main();
+void main();
diff --git a/keyserver/src/scripts/create-relationships.js b/keyserver/src/scripts/create-relationships.js
--- a/keyserver/src/scripts/create-relationships.js
+++ b/keyserver/src/scripts/create-relationships.js
@@ -66,4 +66,4 @@
await createUndirectedRelationships(result, undirectedStatus.KNOW_OF);
}
-main();
+void main();
diff --git a/keyserver/src/scripts/create-sidebar-permissions.js b/keyserver/src/scripts/create-sidebar-permissions.js
--- a/keyserver/src/scripts/create-sidebar-permissions.js
+++ b/keyserver/src/scripts/create-sidebar-permissions.js
@@ -39,4 +39,4 @@
await dbQuery(updateAdminRoles);
}
-main();
+void main();
diff --git a/keyserver/src/scripts/delete-unread-column.js b/keyserver/src/scripts/delete-unread-column.js
--- a/keyserver/src/scripts/delete-unread-column.js
+++ b/keyserver/src/scripts/delete-unread-column.js
@@ -16,4 +16,4 @@
}
}
-deleteUnreadColumn();
+void deleteUnreadColumn();
diff --git a/keyserver/src/scripts/image-size.js b/keyserver/src/scripts/image-size.js
--- a/keyserver/src/scripts/image-size.js
+++ b/keyserver/src/scripts/image-size.js
@@ -33,4 +33,4 @@
}
}
-main();
+void main();
diff --git a/keyserver/src/scripts/make-notif-columns-optional.js b/keyserver/src/scripts/make-notif-columns-optional.js
--- a/keyserver/src/scripts/make-notif-columns-optional.js
+++ b/keyserver/src/scripts/make-notif-columns-optional.js
@@ -21,4 +21,4 @@
`);
}
-main();
+void main();
diff --git a/keyserver/src/scripts/merge-users.js b/keyserver/src/scripts/merge-users.js
--- a/keyserver/src/scripts/merge-users.js
+++ b/keyserver/src/scripts/merge-users.js
@@ -192,4 +192,4 @@
};
}
-main();
+void main();
diff --git a/keyserver/src/scripts/set-last-read-messages.js b/keyserver/src/scripts/set-last-read-messages.js
--- a/keyserver/src/scripts/set-last-read-messages.js
+++ b/keyserver/src/scripts/set-last-read-messages.js
@@ -127,4 +127,4 @@
}
}
-main();
+void main();
diff --git a/keyserver/src/scripts/utils.js b/keyserver/src/scripts/utils.js
--- a/keyserver/src/scripts/utils.js
+++ b/keyserver/src/scripts/utils.js
@@ -12,17 +12,19 @@
endAPNs();
}
-async function main(functions: $ReadOnlyArray<() => Promise<mixed>>) {
- await prefetchAllURLFacts();
- try {
- for (const f of functions) {
- await f();
+function main(functions: $ReadOnlyArray<() => Promise<mixed>>) {
+ void (async () => {
+ await prefetchAllURLFacts();
+ try {
+ for (const f of functions) {
+ await f();
+ }
+ } catch (e) {
+ console.warn(e);
+ } finally {
+ endScript();
}
- } catch (e) {
- console.warn(e);
- } finally {
- endScript();
- }
+ })();
}
export { endScript, main };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 8:08 AM (21 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2583223
Default Alt Text
D10177.id34235.diff (3 KB)
Attached To
Mode
D10177: [keyserver] Ignore potential to crash on promise rejections in scripts
Attached
Detach File
Event Timeline
Log In to Comment