Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 18bccc7

Browse files
committed
update get rounds for problem api to use informixoltp
1 parent 790a1d8 commit 18bccc7

File tree

5 files changed

+102
-12
lines changed

5 files changed

+102
-12
lines changed

actions/srmChallenges.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2626,7 +2626,7 @@ exports.getSrmRoundsForProblem = {
26262626
outputExample: {},
26272627
version: 'v2',
26282628
transaction: 'read', // this action is read-only
2629-
databases: ["topcoder_dw"],
2629+
databases: ["informixoltp"],
26302630
run: function (api, connection, next) {
26312631
if (connection.dbConnectionMap) {
26322632
api.log("Execute getSrmRoundsForProblem", 'debug');

deploy/vm.sh

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#!/bin/bash
2+
3+
#
4+
# Copyright (C) 2013-2014 TopCoder Inc., All Rights Reserved.
5+
#
6+
# Version: 1.2
7+
# Author: vangavroche, isv
8+
# changes in 1.1:
9+
# - add JIRA_USERNAME and JIRA_PASSWORD
10+
# changes in 1.2:
11+
# - added RESET_PASSWORD_TOKEN_CACHE_EXPIRY environment variable
12+
# - added RESET_PASSWORD_TOKEN_EMAIL_SUBJECT environment variable
13+
# - added REDIS_HOST environment variable
14+
# - added REDIS_PORT environment variable
15+
#
16+
17+
# tests rely on caching being off. But set this to a real value (or remove) while coding.
18+
export CACHE_EXPIRY=-1
19+
20+
VM_IP=env.topcoder.com
21+
if [ -n "$TC_VM_IP" ]
22+
then
23+
VM_IP=$TC_VM_IP
24+
fi
25+
26+
export TC_DB_NAME=informixoltp_tcp
27+
export TC_DB_HOST=$VM_IP
28+
export TC_DB_PORT=2021
29+
export TC_DB_USER=informix
30+
export TC_DB_PASSWORD=1nf0rm1x
31+
32+
export TC_DW_NAME=informixoltp_tcp
33+
export TC_DW_HOST=$VM_IP
34+
export TC_DW_PORT=2021
35+
export TC_DW_USER=informix
36+
export TC_DW_PASSWORD=1nf0rm1x
37+
38+
# oauth provider
39+
export TC_API_HOST=env.topcoder.com
40+
41+
# LDAP settings
42+
export TC_LDAP_HOST=$VM_IP
43+
export TC_LDAP_PORT=636
44+
export TC_LDAP_PASSWORD=secret
45+
export TC_LDAP_MEMBER_BASE_DN="ou=members, dc=topcoder, dc=com"
46+
export TC_BIND_DN="cn=Manager,dc=topcoder,dc=com"
47+
48+
# Mail settings
49+
export TC_EMAIL_HOST=smtp.gmail.com
50+
export TC_EMAIL_HOST_PORT=465
51+
export TC_EMAIL_SECURED=true
52+
export TC_EMAIL_ACCOUNT=tc.ldap.test.1@gmail.com
53+
export TC_EMAIL_PASSWORD=tc_public_email
54+
export TC_EMAIL_FROM=tc.ldap.test.1@gmail.com
55+
export TC_EMAIL_TEMPLATE_DIR=mail_templates
56+
57+
export TC_ACTIVATION_SERVER_NAME="https://www.topcoder.com"
58+
export TC_SOFTWARE_SERVER_NAME="https://software.topcoder.com"
59+
export TC_FORUMS_SERVER_NAME="http://apps.topcoder.com/forums"
60+
61+
export PASSWORD_HASH_KEY="ciTHHTSMg6ixffIuPbB30A=="
62+
## JDBC connection pool environment variables - set for all databases
63+
export MINPOOL=1
64+
export MAXPOOL=20
65+
export MAXSIZE=0
66+
export IDLETIMEOUT=3600
67+
export TIMEOUT=30000
68+
69+
# Used in Jira soap service (Bugs API)
70+
export JIRA_USERNAME=api_test
71+
export JIRA_PASSWORD=8CDDp6BHLtUeUdD
72+
73+
# Forum settings
74+
export STUDIO_FORUMS_SERVER_NAME="http://studio.topcoder.com/forums"
75+
export GRANT_FORUM_ACCESS=false
76+
export DEV_FORUM_JNDI=jnp://env.topcoder.com:1199
77+
78+
## The period for expiring the generated tokens for password resetting
79+
export RESET_PASSWORD_TOKEN_EMAIL_SUBJECT=TopCoder Account Password Reset
80+
# Set this to 180000 which is 3 mins. This will help saving time for test.
81+
export RESET_PASSWORD_TOKEN_CACHE_EXPIRY=180000
82+
83+
export REDIS_HOST=localhost
84+
export REDIS_PORT=6379
85+
86+
export DEVELOP_SUBMISSION_MAX_SIZE=6144
87+
88+
export WATERMARK_FILE_PATH=test/test_files/design_image_file_generator/studio_logo_watermark.png
89+
90+
export TC_API_MAX_MEMORY=256m
91+
export DEV_FORUM_JNDI=jnp://env.topcoder.com:1199
92+
export PORT=8081
93+
export API_ENDPOINT=http://localhost:8081
94+

queries/check_problem_exists.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name" : "check_problem_exists",
3-
"db" : "topcoder_dw",
3+
"db" : "informixoltp",
44
"sqlfile" : "check_problem_exists"
55
}

queries/get_rounds_for_problem

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ SELECT
33
r.name AS round_name,
44
r.contest_id,
55
(SELECT name FROM contest c WHERE c.contest_id = r.contest_id) AS contest_name,
6-
(SELECT division_desc FROM division_lu d WHERE p.division_id = d.division_id) AS division_description,
7-
p.level_desc AS level_description,
86
r.editorial_link
97
FROM
10-
problem p,
11-
round r
12-
WHERE
13-
p.problem_id = @problem_id@ AND
14-
p.round_id = r.round_id AND
15-
r.round_type_id IN (1,2,10,20) AND
16-
r.status = 'P'
8+
problem p
9+
INNER JOIN component c ON c.problem_id = p.problem_id
10+
INNER JOIN round_component rc ON rc.component_id = c.component_id
11+
INNER JOIN round r ON r.round_id = rc.round_id
12+
WHERE p.problem_id = @problem_id@
1713
ORDER BY r.round_id ASC;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name" : "get_rounds_for_problem",
3-
"db" : "topcoder_dw",
3+
"db" : "informixoltp",
44
"sqlfile" : "get_rounds_for_problem"
55
}

0 commit comments

Comments
 (0)