Logs & DDBB kibotics webserber
1. Logs and DDBB
Hello there,
This week I’ve continue working with the log script, integrating it in a Django test Webserver, like in the following image:
2. Logs
I’ve been analizing the logs that the actual kibotics webserver traks on the “log.txt” file, these are the strings inserted in the file on the views.py Django file:
-
“New Simulation ==> “ + str(datetime.now().strftime(“%d/%m/%Y %H:%M:%S”)) + “: “ + user.username + “ “ + client_ip + “ “ + simulation_type + “ “ + exercise_id + “ “ + host.ip + “ “ + container.id + “\n”
-
“Error ==> 500 Internal Server Error” + “\n”
3. DDBB
To finish the week i’ve also analized the DDBB in production:
Exercise - exercise_id - CharField - name - CharField - state (Active, Inactive, Testing) - platform (Gazebo, Websim, Real, Theory, Vision, Tutorials) - language (python, javascript, scratch) - description - CharField - video - CharField - topic - CharField - thumbnail - CharField - assets - CharField - gui - CharField - referee - CharField - real - CharField - compute_load - IntegerField - observations - TextField
Pack - pack_id - CharField - name - CharField - exercises - ManyToManyField(Exercise) - observations - TextField
Permissions Meta (is_admin, is_profesor, is_alumno)
Host - host - CharField - ip - CharField - main_server - BooleanField - active - BooleanField - max_simulations - IntegerField - running_simulations - IntegerField - priority - IntegerField - cpu_limit - FloatField - memory_limit - CharField - uc_equivalence - FloatField - compute_load - IntegerField - compute_capacity - IntegerField
Simulation - user - CharField - init_simulation - CharField - simulation_type - CharField - exercise - CharField - docker_id - CharField - client_ip - CharField - host_ip - CharField - ws_channel - CharField - active - BooleanField
Code - code - CharField - group - CharField - packs - ManyToManyField(Pack) - observations - TextField
User - role (Admin, BetaTester, Profesor, Alumno) - exercises - ManyToManyField(Exercise) - packs - ManyToManyField(pack) - code - ManyToManyField(code) - observations - TextField