Skip to content

Commit a5cf2c8

Browse files
committed
Comment out language criteria
1 parent e9a4364 commit a5cf2c8

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

backend/matching-service/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
## Running Matching Service Individually with Docker
1414

15-
1. Set up and run RabbitMq locally on your computer with the command `docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:4.0-management`. If you encounter connection errors, please wait for a few minutes as RabbitMq may take some time to start up.
15+
1. Set up and run RabbitMq locally on your computer with the command `docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:4.0-management`.
1616

1717
2. Open Command Line/Terminal and navigate into the `matching-service` directory.
1818

1919
3. Run the command: `npm install`. This will install all the necessary dependencies.
2020

21-
4. Run the command `npm start` to start the Matching Service in production mode, or use `npm run dev` for development mode, which includes features like automatic server restart when you make code changes.
21+
4. Run the command `npm start` to start the Matching Service in production mode, or use `npm run dev` for development mode, which includes features like automatic server restart when you make code changes. If you encounter connection errors, please wait for a few minutes before running `npm start` again as RabbitMq may take some time to start up.
2222

2323
## After running
2424

backend/matching-service/config/rabbitmq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const connectRabbitMq = async () => {
1414
const consumerChannel = await mrConnection.createChannel();
1515
await consumerChannel.assertQueue(queue);
1616

17-
consumerChannel.consume(queue, async (msg) => {
17+
consumerChannel.consume(queue, (msg) => {
1818
if (msg !== null) {
1919
matchUsers(msg.content.toString());
2020
consumerChannel.ack(msg);

backend/matching-service/src/utils/mq_utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ const isMatch = (req1: MatchRequestItem, req2: MatchRequestItem): boolean => {
4444
const hasCommonCategory = req1.categories.some((elem) =>
4545
req2.categories.includes(elem)
4646
);
47-
const hasCommonLanguage = req1.languages.some((elem) =>
48-
req2.languages.includes(elem)
49-
);
47+
// const hasCommonLanguage = req1.languages.some((elem) =>
48+
// req2.languages.includes(elem)
49+
// );
5050

51-
return hasCommonComplexity && hasCommonCategory && hasCommonLanguage;
51+
return hasCommonComplexity && hasCommonCategory;
5252
};

frontend/src/pages/Home/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import classes from "./index.module.css";
1414
import AppMargin from "../../components/AppMargin";
1515
import {
1616
complexityList,
17-
languageList,
17+
// languageList,
1818
maxMatchTimeout,
1919
minMatchTimeout,
2020
USE_MATCH_ERROR_MESSAGE,
@@ -31,7 +31,7 @@ import Loader from "../../components/Loader";
3131
const Home: React.FC = () => {
3232
const [complexities, setComplexities] = useState<string[]>([]);
3333
const [categories, setCategories] = useState<string[]>([]);
34-
const [languages, setLanguages] = useState<string[]>([]);
34+
const [languages, _setLanguages] = useState<string[]>([]);
3535
const [timeout, setTimeout] = useState<number | undefined>(30);
3636

3737
const [state, dispatch] = useReducer(reducer, initialState);
@@ -181,7 +181,7 @@ const Home: React.FC = () => {
181181
</FormControl>
182182
</Grid2>
183183

184-
<Grid2 size={2}>
184+
{/* <Grid2 size={2}>
185185
<Typography
186186
align="left"
187187
sx={{ fontWeight: "bold", paddingRight: 2 }}
@@ -219,7 +219,7 @@ const Home: React.FC = () => {
219219
}
220220
/>
221221
</FormControl>
222-
</Grid2>
222+
</Grid2> */}
223223

224224
<Grid2 size={2}>
225225
<Typography
@@ -270,8 +270,8 @@ const Home: React.FC = () => {
270270
timeout < minMatchTimeout ||
271271
timeout > maxMatchTimeout ||
272272
complexities.length == 0 ||
273-
categories.length == 0 ||
274-
languages.length == 0
273+
categories.length == 0
274+
// || languages.length == 0
275275
}
276276
onClick={() =>
277277
findMatch(complexities, categories, languages, timeout!)

0 commit comments

Comments
 (0)