[CORL 133] API Review (#2197)

* refactor: removed unused subscription code

* refactor: removed management api's

* refactor: cleanup of connections

* refactor: refactored comments edge

* refactor: simplified connection resolving

* feat: added story connection edge

* fix: added story index

* feat: added user pagination and user edge

* fix: added filter to comment query

* fix: removed unused resolvers

* fix: creating a comment reply should require auth

* refactor: cleanup of graph files

* feat: removed display name, made username non-unique

* fix: fixed tests

* fix: fixed tests

* fix: added more api docs

* fix: fixed bug with installer

* refactor: fixes and updates

* fix: added linting for graphql, fixed schema

* feat: added docker build tests

* fix: upped output timeout

* fix: fixed stacktraces in production builds

* fix: removed `git add`

- `git add` was causing issues with
    partial staged changs on files

* feat: improved error messaging for auth

* refactor: cleaned up queue names

* fix: merge error
This commit is contained in:
Wyatt Johnson
2019-03-12 14:12:21 +00:00
committed by Kiwi
parent 37959f9398
commit d37333be89
125 changed files with 1272 additions and 1539 deletions
+2 -2
View File
@@ -137,7 +137,7 @@ export interface MailerInput {
tenantID: string;
}
export class Mailer {
export class MailerQueue {
private task: Task<MailerData>;
private content: MailerContent;
private tenantCache: TenantCache;
@@ -205,4 +205,4 @@ export class Mailer {
export const createMailerTask = (
queue: Queue.QueueOptions,
options: MailProcessorOptions
) => new Mailer(queue, options);
) => new MailerQueue(queue, options);
@@ -1,5 +1,6 @@
import Queue, { Job } from "bull";
import { Db } from "mongodb";
import now from "performance-now";
import logger from "talk-server/logger";
import Task from "talk-server/queue/Task";
@@ -31,6 +32,9 @@ const createJobProcessor = ({ mongo }: ScrapeProcessorOptions) => async (
tenantID,
});
// Mark the start time.
const startTime = now();
log.debug("starting to scrape the story");
try {
@@ -41,8 +45,15 @@ const createJobProcessor = ({ mongo }: ScrapeProcessorOptions) => async (
throw err;
}
// Compute the end time.
const responseTime = Math.round(now() - startTime);
log.debug({ responseTime }, "scraped the story");
};
export type ScraperQueue = Task<ScraperData>;
export function createScraperTask(
queue: Queue.QueueOptions,
options: ScrapeProcessorOptions