-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bacpop-25 use gps v6 db #42
Changes from 8 commits
b803baf
1e74854
72d966f
a0d8b57
44065ef
8234376
2405525
5f345a7
095143d
1d46810
10e7225
790eb67
189cea9
de3e888
97ffd74
000c6da
f34e7ce
c6e2223
a7bd996
ab366fd
0163d1e
1883ba5
e9da2a9
e9bdc7c
d4187f5
d37f9b3
943648f
bda569e
2332bae
0ca15a3
9a070c0
f344503
12673ff
9ddfa88
67a3389
90c7319
ac27364
758e8a5
ae44116
4bb8a94
1036aa3
2060c5f
f5159bb
8a74952
12dc93e
248458b
c5a050c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/* eslint-disable import/first */ | ||
import EditProjectName from "@/components/projects/EditProjectName.vue"; | ||
import EditProjectName from "@/components/projects/EditProjectName.vue" | ||
|
||
const { toLocaleString } = Date.prototype; | ||
// eslint-disable-next-line no-extend-native | ||
// eslint-disable-next-line no-extend-native, func-names | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disabling this rule here to remove lint warning . |
||
Date.prototype.toLocaleString = function (locale: any = undefined, ...args: any) { | ||
const options = args[0]; | ||
return toLocaleString.call(this, "en-GB", { ...options, timeZone: "UTC" }); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import {flushRedis, get, post, saveRedisHash, saveRedisSet} from "./utils"; | ||
import {uid} from "uid"; | ||
import {setTimeout} from "timers/promises"; | ||
import {testSample} from "./testSample"; | ||
|
||
describe("Error handling", () => { | ||
|
@@ -43,19 +44,18 @@ describe("Error handling", () => { | |
testSample.projectId = projectId; | ||
const poppunkRes = await post(`poppunk`, testSample, connectionCookie); | ||
expect(poppunkRes.status).toBe(200); | ||
const counter = 0; | ||
let counter = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This counter hadn't been counting! |
||
let finished = false; | ||
while (!finished && counter < 100) { | ||
await new Promise(resolve => { | ||
setTimeout(() => {resolve(""), 1000}) | ||
}); | ||
await setTimeout(2000); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous attempt at delays between polling hadn't been working, so we were getting some intermittent test failures, which I think were related to spamming the endpoint. Bumping up the delay as well to avoid intermittent errors on first poll . There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we use fake timers here instead if possible? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately not, as we're waiting for a popunk job to finish and polling the real beebop_py api. |
||
const statusRes = await post("status", {hash: testSample.projectHash}, connectionCookie); | ||
expect(statusRes.status).toBe(200); | ||
const statusValues = statusRes.data.data; | ||
if (statusValues.assign === "finished" && statusValues.microreact === "finished" && statusValues.network === "finished") { | ||
finished = true; | ||
break; | ||
} | ||
counter = counter + 1; | ||
} | ||
expect(finished).toBe(true); | ||
return projectId; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ NETWORK=beebop_nw | |
VOLUME=beebop-storage | ||
NAME_REDIS=beebop-redis | ||
NAME_API=beebop-py-api | ||
API_BRANCH=main | ||
API_BRANCH=bacpop-25 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. leaving comment so can be changed before merge |
||
NAME_WORKER=beebop-py-worker | ||
PORT=5000 | ||
|
||
|
@@ -14,13 +14,13 @@ docker network create $NETWORK > /dev/null || /bin/true | |
docker run -d --rm --name $NAME_REDIS --network=$NETWORK -p 6379:6379 redis:5.0 | ||
docker run -d --rm --name $NAME_WORKER --network=$NETWORK \ | ||
--env=REDIS_HOST="$NAME_REDIS" \ | ||
--pull always \ | ||
-v $VOLUME:/beebop/storage \ | ||
mrcide/beebop-py:$API_BRANCH rqworker | ||
docker run -d --rm --name $NAME_API --network=$NETWORK \ | ||
--pull always \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this pull not be retained? also the --rm? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The rm should! I'll re-add that. I've moved the pull to previous docker run, which is for the same image - |
||
docker run -d --name $NAME_API --network=$NETWORK \ | ||
--env=REDIS_HOST="$NAME_REDIS" \ | ||
--env=STORAGE_LOCATION="./storage" \ | ||
--env=DB_LOCATION="./storage/GPS_v4_references" \ | ||
--env=DB_LOCATION="./storage/GPS_v6_references" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will we ever run with v4 again? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably not. Are you thinking we could just have a fixed storage location? |
||
-v $VOLUME:/beebop/storage \ | ||
-p $PORT:5000 \ | ||
mrcide/beebop-py:$API_BRANCH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path just seemed to be wrong!