logistics -> exporter, remove cutesy naming of lib

This commit is contained in:
Tom Moor
2021-02-22 21:51:01 -08:00
parent 04f942141f
commit 2195787e7d
3 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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,