Beispiel #1
0
        public static List <Job> GetJobList()
        {
            DLWorkspaceUtils.DataHandler dataHandler = new DLWorkspaceUtils.DataHandler();
            List <Job> jobs = dataHandler.GetJobList();

            dataHandler.Close();
            return(jobs);
        }
Beispiel #2
0
        public static bool KillJob(string jobId)
        {
            DLWorkspaceUtils.DataHandler dataHandler = new DLWorkspaceUtils.DataHandler();
            bool ret = dataHandler.KillJob(jobId);

            dataHandler.Close();
            return(ret);
        }
Beispiel #3
0
        public static Job GetJobDetail(string jobId)
        {
            Dictionary <string, string> ret = new Dictionary <string, string>();

            DLWorkspaceUtils.DataHandler dataHandler = new DLWorkspaceUtils.DataHandler();
            Job job = dataHandler.GetJob(jobId);

            try
            {
                string log = dataHandler.GetJobTextField(jobId, "jobLog");
                if (log != null)
                {
                    job.log = log;
                }
            }
            catch (Exception e)
            {
                job.log = "fail-to-get-logs";
            }

            dataHandler.Close();
            return(job);
        }