Skip to content
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

571 restructuring db #585

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e2a325e
522: v1.0: did check_list and logs
necitboss Jul 1, 2024
1ad4b39
522: v1.1: add lti and do better logger
necitboss Jul 1, 2024
58bdb9d
522: v1.2: add login
necitboss Jul 1, 2024
2a9bb58
522: v1.3: add user
necitboss Jul 1, 2024
94c2ab8
522: v1.4: add tasks and modified pre_luncher
necitboss Jul 1, 2024
4e74670
522: v1.5: add upload
necitboss Jul 1, 2024
476d3b2
522: v1.6: add recheck and modify tasks
necitboss Jul 1, 2024
4b306f7
522: v1.7: add results
necitboss Jul 1, 2024
276ca5b
522: v1.8: add route api and fix bug redirect(url_for())
necitboss Jul 1, 2024
a2585dc
522: v1.9: add checks
necitboss Jul 2, 2024
b35d9cb
522: v1.10: add criterion_pack, criterion_packs and update pack_list.…
necitboss Jul 2, 2024
446f1fa
522: v1.11: add get_csv and get_zip, modified check_list: remove unus…
necitboss Jul 2, 2024
ab55964
522: v1.12: add get_pdf
necitboss Jul 2, 2024
c610521
522: v1.13: add get_last_check_results
necitboss Jul 2, 2024
15ad1dc
522: v1.14: add version route
necitboss Jul 2, 2024
c76151e
522: v1.15: add capacity route
necitboss Jul 2, 2024
1f8c86b
522: v1.16: add profile route
necitboss Jul 2, 2024
6543372
522: v1.16: last commit, modified check_list.js
necitboss Jul 3, 2024
7e29f4d
522: v1.17: return deleted files
necitboss Jul 3, 2024
3b26630
522: v1.18: templates fixed
necitboss Jul 3, 2024
2e8c929
522: v1.19: server fixed
necitboss Jul 3, 2024
b73cff8
522: v1.20: checks route bug fixed
necitboss Jul 3, 2024
e123079
571: v 2.0: restructure db_types
necitboss Jul 4, 2024
eb96527
571: v 2.1: fix db_types
necitboss Jul 5, 2024
3be4ac9
571: v 2.2: add client.py
necitboss Jul 5, 2024
7b37b79
571: v 2.3: add methods db
necitboss Jul 5, 2024
1a32f2f
571: refactor methods and types
necitboss Jul 5, 2024
5a94f3b
571: fix bug imports
necitboss Jul 5, 2024
00657a3
Merge branch 'master' into 522_routes_modification
HadronCollider Aug 28, 2024
17dd027
Merge branch 'master' into 522_routes_modification
HadronCollider Aug 28, 2024
188a31c
Merge branch '522_routes_modification' into 571_restructuring_db
HadronCollider Aug 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/VERSION.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "example commit",
"message": "necit's branch",
"date": "02.07.2024",
"version": "0.1.12"
}
8 changes: 4 additions & 4 deletions app/VERSION_example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "",
"message": "",
"date": "",
"version": ""
"commit": "example commit",
"message": "necit's branch",
"date": "02.07.2024",
"version": "0.1.12"
}
2 changes: 1 addition & 1 deletion app/db/clear_users.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from .db_methods import client
from .db_main import client

logger = logging.getLogger('root_logger')

Expand Down
38 changes: 38 additions & 0 deletions app/db/db_main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from app.db.methods.client import get_client, get_db, get_fs

client = get_client()
db = get_db()
fs = get_fs()

users_collection = db['users']
files_info_collection = db['presentations'] # actually, collection for all files (pres and reports)
checks_collection = db['checks']
consumers_collection = db['consumers']
criteria_pack_collection = db['criteria_pack']
logs_collection = db.create_collection(
'logs', capped=True, size=5242880) if not db['logs'] else db['logs']
celery_check_collection = db['celery_check'] # collection for mapping celery_task to check


def get_checks_collection():
return checks_collection


def get_users_collection():
return users_collection


def get_criteria_pack_collection():
return criteria_pack_collection


def get_files_info_collection():
return files_info_collection


def get_logs_collection():
return logs_collection


def get_celery_check_collection():
return celery_check_collection
Loading
Loading