-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
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.
la v2 se rapproche :D
7b98ceb
to
f950f89
Compare
if stream_name == REDIS_STREAM_CHALLENGES: | ||
await set_all_challenges() | ||
|
||
await app.redis.xack(stream_name, CG_NAME, message_id) |
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.
ya pas un mode autoack sur aioredis?
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.
euh aucune idée jvais regarder
GITHUB_ACCOUNTS = ["https://github.com/zteeed", "https://github.com/bonnetn"] | ||
REDIS_STREAM_USERS = 'update_users' | ||
REDIS_STREAM_CHALLENGES = 'update_challenges' | ||
CG_NAME = 'rootme' |
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.
Tu peux pas merge api/api/constants.py et celui là? si tu mets les mêmes valeurs..
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.
bah ca veut dire que les subprojects worker et api sont dépendants, a terme peut etre gérer ça avec des variables d'environnements spécifiés dans les Dockerfile ?
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.
Oui tu peux, ou laisse comme ça.si tu as une bonne raison c'est pas grave
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.
je note ca quelque part ca sera modifié sur la partie mise en prod
668a91a
to
ba8ae70
Compare
data = await redis_app.get(f'{key}') | ||
now = datetime.now() | ||
timestamp = extract_timestamp_last_update(data) | ||
timeout = get_timeout(handler_type) |
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.
Pourquoi tu passes pas le timeout directement en argumetn de cette fonction? C'est la fonction parente qui a le plus de connaissance sur quel timeout mettre
elif handler_type == 'dynamic_user' and arg is not None and condition: | ||
await redis_app.xadd(REDIS_STREAM_USERS, {b'username': arg.encode()}) | ||
elif handler_type == 'dynamic_categories' and arg is not None and condition: | ||
await redis_app.xadd(REDIS_STREAM_CHALLENGES, {b'update': b"ok"}) |
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.
update:ok
est ignoré non? pourquoi mettre une valeur ici?
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.
peu importe oui
@@ -1,4 +1,5 @@ | |||
import itertools | |||
from typing import List, Tuple |
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.
Ce fichier est plus utilisé si?
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.
sisi
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.
ca concernera une autre PR ca
Je pense qu'on peut améliorer la structure du projet:
Je trouve que le module parser est super car il est totalement self-contained. Il prend des strings et les parse en structures de données que tu veux, il fait son taff et juste sont taff.. Par contre redis_interface fait un peu tout... Genre dans Je pense que l'actuel
C'est juste une proposition, mais avec ça, juste en lisant la 3ème classe on peut comprendre ce que fait concrètement ton worker, et en lisant les interfaces, on peut comprendre COMMENT il fait |
No description provided.