From 94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 25 Jan 2018 15:05:18 +0100 Subject: Move job queue to redis We'll use it as cache in the future. /!\ You'll loose your old jobs (pending jobs too) so upgrade only when you don't have pending job anymore. --- server/tests/utils/server/jobs.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server/tests/utils') diff --git a/server/tests/utils/server/jobs.ts b/server/tests/utils/server/jobs.ts index 0a8c51575..4053dd40b 100644 --- a/server/tests/utils/server/jobs.ts +++ b/server/tests/utils/server/jobs.ts @@ -1,7 +1,8 @@ import * as request from 'supertest' +import { JobState } from '../../../../shared/models' -function getJobsList (url: string, accessToken: string) { - const path = '/api/v1/jobs' +function getJobsList (url: string, accessToken: string, state: JobState) { + const path = '/api/v1/jobs/' + state return request(url) .get(path) @@ -11,8 +12,8 @@ function getJobsList (url: string, accessToken: string) { .expect('Content-Type', /json/) } -function getJobsListPaginationAndSort (url: string, accessToken: string, start: number, count: number, sort: string) { - const path = '/api/v1/jobs' +function getJobsListPaginationAndSort (url: string, accessToken: string, state: JobState, start: number, count: number, sort: string) { + const path = '/api/v1/jobs/' + state return request(url) .get(path) -- cgit v1.2.3