Commit 9ce51f9b authored by Carla Goncalves Ourofino's avatar Carla Goncalves Ourofino
Browse files

Merge branch 'newFeature/SOMA-1288-action-terminate-pbs-WS' into 'sgarest-websintesi'

Adicionando a ação de terminate ao driver pbs

See merge request !25
parents 43e9dd23 7d1dd18e
......@@ -9,6 +9,7 @@ local cmds = {
nodeinfo = "pbsnodes -a ",
qsub = "qsub ",
qstat = "qstat -fx ",
qdel = "qdel ",
--- Type of the SGA, returned to the server during registration.
......@@ -164,7 +165,25 @@ local function get_mem(minfo)
pbs.actions = {
-- Terminates a command
-- @param job The job object
terminate = function(self, job)
local data, err =
if not data then
data, err = qstat(self, job)
if not data then
return nil, err
local state = pbs_to_sga_state[data.Job.job_state]
if state ~= "FINISHED" then
self.exec:run( = true
return true
return false, "Job is not running"
-- Gets a command current status
-- @param job The job object
-- @return A table with information for each command component (process)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment