Skip to content
Snippets Groups Projects
Commit 3250bdd2 authored by oenvoyage's avatar oenvoyage
Browse files

fix some typos found while doing a first pass of reading the code.

parent f3a76f3b
Branches
Tags
No related merge requests found
......@@ -24,13 +24,13 @@ At the moment there are two main files and one folder:
* master.py - the server that handles all the client connections and dispatches orders
* client.py - a client that connects to the master and waits for orders
* dashboard - contains a simple web application that provides a GUI for managin server and clients
* dashboard - contains a simple web application that provides a GUI for managing server and clients
Is is possible to connect to the master via telnet using the command `telent localhost 6000`.
It is possible to connect to the master via telnet using the command `telent localhost 6000`.
A command prompt will appear and it will be possible to talk to the master (at the moment some basic commands are still usable, but the idea is to make it support only normal API strings - see the syntax below).
### Past steps
The next milestone for the development is to achive a solid system for enabling and disabling clients (both via command line interface and web interface). This will be achieved in several steps:
The next milestone for the development is to achieve a solid system for enabling and disabling clients (both via command line interface and web interface). This will be achieved in several steps:
* develop a versatile attributes CRUD API for the objects (both via CLI and WI)
* integrate an ORM such as `pewee` for handling a mirrored database with all the clients, jobs, etc
......@@ -49,14 +49,14 @@ This allows to keep data centralized and share an API across different interface
After some quite intense research we dropped the idea of using CodeIgniter as a framweork and built ourselves a simpler one. The current framework provides:
* fully configurable url routing
* web interface with dataDables and data loaded via AJAX
* web interface with dataTables and data loaded via AJAX
* JSON data output (was a pain to get it working because we forgot to close the socket once the query was completed)
### How to use the web interface
It's quite simple. The web interface is situated in the folder called `dashboard`. Set the Apache home directory in that folder and you should be able to see it via the web browser. Here is a list of the main files and folders:
* config.php - basic configuration (server address and port)
* index.pgp - sets up the routing and point to the webroot folder
* index.php - sets up the routing and point to the webroot folder
* lib - contains any library used by the application (currently only one functions.php file)
* pages - content of each page of the application
* tpl - templates used to wrap page contents
......@@ -73,7 +73,7 @@ Frameworks and tools used by the interface are:
Here we explain how the software works in some of its most important parts.
### Startup
Before we start running the server we load from the database a list of clients and run them throug an inizialize_runtime_client function that create the client object we use in the application. These objects are appended to the runtime_clients list. We do this because accessing clients from memory is much faster!
Before we start running the server we load from the database a list of clients and run them through an initialize_runtime_client function that create the client object we use in the application. These objects are appended to the runtime_clients list. We do this because accessing clients from memory is much faster!
### Client connection
When a client connects we check if it was there before (if it is in the runtime_clients list loaded from the database at startup). If it's there we enable it, if not, we:
......
......@@ -214,7 +214,7 @@ def fill_with_data():
chunk_size = 5,
current_frame = 2,
filepath = 'path',
render_settings = 'will refer to settins table',
render_settings = 'will refer to settings table',
status = 'running',
priority = 10,
owner = 'fsiddi')
......
......@@ -26,7 +26,7 @@ client_index = 0
class Client(object):
"""A client object will be instanced everytime this class is called.
This is an important building block of brender. All the methods avalialbe
This is an important building block of brender. All the methods available
here will be calling some model method (from specific classes). For the
moment we do this internally. Methods that need implementation are:
......@@ -98,7 +98,7 @@ def set_client_attribute(*attributes):
The first tuple is used for selecting one (and in the future more) clients
from the clients_list and the second one sets the attributes to the
selected client.
Tis function makes use of the client_select function above and is limited
This function makes use of the client_select function above and is limited
by its functionality.
"""
......@@ -143,7 +143,7 @@ def json_io(fileobj, json_input):
elif key == 'values':
values = json_input['values']
else:
d_print("[Warning] Unkown keys injected!")
d_print("[Warning] Unknown keys injected!")
"""
item = json_input['item']
......@@ -254,7 +254,7 @@ def json_io(fileobj, json_input):
pass # apply to all
else:
pass #can't update with not new values!
pass a #can't update with not new values!
elif action == 'delete':
pass
else:
......@@ -277,7 +277,8 @@ def json_io(fileobj, json_input):
print('[<-] Sending list of sequences to interface')
table_rows = []
for sequence in Sequences.select():
table_rows.append({"DT_RowId": sequence.id,
table_rows.append({
"DT_RowId": sequence.id,
"0" : sequence.project.name,
"1" : sequence.name,
"2" : sequence.description})
......@@ -293,7 +294,7 @@ def json_io(fileobj, json_input):
pass # apply to all
else:
pass #can't update with not new values!
pass # can't update with no new values!
elif action == 'delete':
pass
else:
......@@ -323,7 +324,8 @@ def json_io(fileobj, json_input):
print('[<-] Sending list of shots to interface')
table_rows = []
for shot in Shots.select():
table_rows.append({"DT_RowId": shot.id,
table_rows.append({
"DT_RowId": shot.id,
"0" : shot.sequence.name,
"1" : shot.name,
"2" : shot.description,
......@@ -342,7 +344,7 @@ def json_io(fileobj, json_input):
pass # apply to all
else:
pass #can't update with not new values!
pass # can't update with no new values!
elif action == 'delete':
pass
else:
......@@ -359,7 +361,7 @@ def json_io(fileobj, json_input):
chunk_size = 5,
current_frame = 2,
filepath = 'path',
render_settings = 'will refer to settins table',
render_settings = 'will refer to settings table',
status = 'running',
priority = 10,
owner = 'fsiddi')
......@@ -372,7 +374,8 @@ def json_io(fileobj, json_input):
print('[<-] Sending list of jobs to interface')
table_rows = []
for job in Jobs.select():
table_rows.append({"DT_RowId": job.id,
table_rows.append({
"DT_RowId": job.id,
"0" : job.shot.name,
"1" : job.frame_start,
"2" : job.frame_end,
......@@ -496,7 +499,7 @@ def handle(socket, address):
if line.lower() == 'identify_client':
print ('New connection from %s:%s' % address)
# we want to know if the cliend connected before
# we want to know if the client connected before
#fileobj.write('mac_addr')
#fileobj.flush()
order = {"type": "system", "command": "mac_address"}
......@@ -509,7 +512,7 @@ def handle(socket, address):
# if the client was connected in the past, there should be an instanced
# object in the clients_list[]. We access it and set the get_status
# variable to True, to make it run and accept incoming orders.
# Since the client_select methog returns a list we have to select the
# Since the client_select method returns a list we have to select the
# first and only item in order to make it work (that's why we have the
# trailing [0] in the selection query for the mac_address here)
......@@ -566,7 +569,7 @@ def handle(socket, address):
# TODO next step is to save order to database
# and then save frames into database
# Only run at the very last fram of a job
# Only run at the very last frame of a job
elif line.lower() == 'finished':
print('Order successfully executed - last frame of the job delivered')
......@@ -661,4 +664,4 @@ if __name__ == '__main__':
server.serve_forever()
except KeyboardInterrupt:
save_to_database()
print("[shutdown] Quitting brender")
\ No newline at end of file
print("[shutdown] Quitting brender")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment