diff --git a/application/controllers/jobs.php b/application/controllers/jobs.php index 8d5de28..a21a3d8 100644 --- a/application/controllers/jobs.php +++ b/application/controllers/jobs.php @@ -57,7 +57,7 @@ class Jobs extends CI_Controller { * @todo not yet verified */ public function get_unseen_results() { - $results = $this->job->get_unseen_results(); + $results = $this->job->getUnseenResults(); $this->output ->set_content_type('application/json') ->set_output(json_encode( diff --git a/application/controllers/statusrpc.php b/application/controllers/statusrpc.php index 3696f0b..89fec9b 100644 --- a/application/controllers/statusrpc.php +++ b/application/controllers/statusrpc.php @@ -44,6 +44,6 @@ class Statusrpc extends CI_Controller { die("Unauthorized access."); } - $this->server->update_workload($secret, $workload); + $this->server->updateWorkload($secret, $workload); } } \ No newline at end of file diff --git a/application/models/job.php b/application/models/job.php index 14f7cc8..b41f906 100644 --- a/application/models/job.php +++ b/application/models/job.php @@ -24,7 +24,7 @@ class Job extends CI_Model { /** * Get a list of results that the owner has not yet seen. */ - public function get_unseen_results() { + public function getUnseenResults() { $query = $this->db->order_by('started_at', 'asc') ->get_where('jobs', array('started_by' => $this->session->userdata('user_id'), 'seen' => '0')); $jobs = $query->result_array(); diff --git a/application/models/project.php b/application/models/project.php index d51e3d0..8cac9f4 100644 --- a/application/models/project.php +++ b/application/models/project.php @@ -102,7 +102,7 @@ class Project extends CI_Model { * * @param array $project_id The project to get the configuration from. */ - public function get_configurations($project_id) { + public function getConfigurations($project_id) { $query = $this->db->get_where('configurations', array('project_id' => $project_id)); $configurations = $query->result_array(); diff --git a/application/models/server.php b/application/models/server.php index f612791..811829c 100644 --- a/application/models/server.php +++ b/application/models/server.php @@ -10,7 +10,7 @@ class Server extends CI_Model { * * @return array List of all available servers. */ - public function get_all() { + public function getAll() { return $this->db->get('servers')->result_array(); } @@ -19,7 +19,7 @@ class Server extends CI_Model { * * @return array List of servers that could handle another job. */ - public function get_idle() { + public function getIdle() { return $this->db->get_where('servers', 'workload <= 2')->result_array(); } @@ -32,7 +32,7 @@ class Server extends CI_Model { * @param type $secret The server's secret for basic authentication. * @param type $workload The server's workload. */ - public function update_workload($secret, $workload) { + public function updateWorkload($secret, $workload) { $this->db->query("UPDATE `servers` SET `workload`=".$this->db->escape($workload) . ", `last_update`=NOW()" . " WHERE `secret`=".$this->db->escape($secret)); @@ -43,7 +43,7 @@ class Server extends CI_Model { * * @todo not yet verified. */ - public function get_best_server() { + public function getBestServer() { return $this->db->limit(1)->order_by('last_update', 'desc')-> get_where('servers', 'workload <= 2')->row_array(); }