arcway 0.4.15 → 0.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import boot from '#server/boot.js';
|
|
2
1
|
import { loadEnvFiles } from '#server/env.js';
|
|
3
2
|
|
|
4
3
|
async function startServer(mode) {
|
|
@@ -11,6 +10,11 @@ async function startServer(mode) {
|
|
|
11
10
|
// dotenv never overrides already-set variables.
|
|
12
11
|
loadEnvFiles(process.cwd(), mode);
|
|
13
12
|
|
|
13
|
+
// Importing the application boot graph loads React-backed page modules.
|
|
14
|
+
// Production mode must be established first so React and react-dom/server
|
|
15
|
+
// select matching builds. A static import here can cache development React
|
|
16
|
+
// before `arcway start` gets a chance to set NODE_ENV.
|
|
17
|
+
const { default: boot } = await import('#server/boot.js');
|
|
14
18
|
const app = await boot({ mode, rootDir: process.cwd() });
|
|
15
19
|
app.logger.info('Arcway framework ready', { mode, port: app.port });
|
|
16
20
|
|
package/server/mail/index.js
CHANGED
|
@@ -95,13 +95,9 @@ function registerSendJob(driver, queue, throughput) {
|
|
|
95
95
|
handler: async () => {
|
|
96
96
|
if (!queue) return;
|
|
97
97
|
const items = await queue.pop(MAIL_TOPIC, 10);
|
|
98
|
-
const ids = [];
|
|
99
98
|
for (const item of items) {
|
|
100
99
|
await driver.send(item.data);
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
if (ids.length > 0) {
|
|
104
|
-
await queue.remove(ids);
|
|
100
|
+
await queue.remove([item.id]);
|
|
105
101
|
}
|
|
106
102
|
},
|
|
107
103
|
throughput,
|