logistics -> exporter, remove cutesy naming of lib
This commit is contained in:
@@ -127,7 +127,7 @@ please refer to the [architecture document](ARCHITECTURE.md) first for a high le
|
||||
Outline uses [debug](https://www.npmjs.com/package/debug). To enable debugging output, the following categories are available:
|
||||
|
||||
```
|
||||
DEBUG=sql,cache,presenters,events,logistics,emails,mailer
|
||||
DEBUG=sql,cache,presenters,events,importer,exporter,emails,mailer
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import fs from "fs";
|
||||
import Router from "koa-router";
|
||||
import { ValidationError } from "../errors";
|
||||
import { exportCollections } from "../logistics";
|
||||
import { exportCollections } from "../exporter";
|
||||
import auth from "../middlewares/authentication";
|
||||
import {
|
||||
Collection,
|
||||
|
||||
@@ -4,8 +4,8 @@ import mailer from "./mailer";
|
||||
import { Collection, Team } from "./models";
|
||||
import { createQueue } from "./utils/queue";
|
||||
|
||||
const log = debug("logistics");
|
||||
const logisticsQueue = createQueue("logistics");
|
||||
const log = debug("exporter");
|
||||
const exporterQueue = createQueue("exporter");
|
||||
const queueOptions = {
|
||||
attempts: 2,
|
||||
removeOnComplete: true,
|
||||
@@ -38,7 +38,7 @@ async function exportAndEmailCollections(teamId: string, email: string) {
|
||||
});
|
||||
}
|
||||
|
||||
logisticsQueue.process(async (job) => {
|
||||
exporterQueue.process(async (job) => {
|
||||
log("Process", job.data);
|
||||
|
||||
switch (job.data.type) {
|
||||
@@ -49,7 +49,7 @@ logisticsQueue.process(async (job) => {
|
||||
});
|
||||
|
||||
export const exportCollections = (teamId: string, email: string) => {
|
||||
logisticsQueue.add(
|
||||
exporterQueue.add(
|
||||
{
|
||||
type: "export-collections",
|
||||
teamId,
|
||||
Reference in New Issue
Block a user