Ejemplo n.º 1
0
        /// <returns>
        ///     -1 - something wrong
        ///     0 - successfully
        ///     1 - job agent is offline
        /// </returns>
        public static int GetJobProperties(int iProcessId, out GalaxyJobProperties jobProperties)
        {
            int iRet = 0;

            jobProperties = null;
            if (ms_jobStatusManager == null)
            {
                return(-1);
            }
            try
            {
                if (ms_jobStatusManager.GetJobProperties(iProcessId, out jobProperties) != 0)
                {
                    iRet = -1;
                }
            }
            catch (System.Net.Sockets.SocketException)
            {
                iRet = 1;
            }
            catch (Exception)
            {
                iRet = -1;
            }

            return(iRet);
        }