コード例 #1
0
        /// <summary>
        /// Default constructor of self submitter. It supports also the debug builds (all the content of your current executable
        /// directory will be transfered automatically such as dlls, pdbs, xmls etc.).
        /// </summary>
        /// <param name="additionalInputFiles">additional files with input data to transfer</param>
        /// <param name="commandLineArgs">additional command line arguments</param>
        public SelfSubmitter(string[] additionalInputFiles = null,
                             string[] commandLineArgs      = null)
        {
            string inputFiles = BuildAdditionalLibrariesToTransfer() + BuildAdditionalInputFiles(additionalInputFiles);

            NewJobSubmitter = new NewJobSubmitter()
            {
                Command = GetExecutableName(),
                InputFilesToTransferCommaSeparated = inputFiles,
                CommandCliArguments = BuildCommandLineArgs(commandLineArgs)
            };
        }
コード例 #2
0
#pragma warning disable IDE0051 // Remove unused private members
        private static void SubmitNewJob()
        {
#pragma warning restore IDE0051 // Remove unused private members
            NewJobSubmitter newJobSubmitter = new NewJobSubmitter {
                Command = "batch.py",
                UserStandardOutputFileName = "stdout.txt",
                TargetOperatingSystem      = TargetOperatingSystem.ANY
            };
            JobDescriptor jobDescriptor = newJobSubmitter.SubmitNewJob();
            Log("Job submitted");
            jobDescriptor.JobStartedEvent.WaitOne();
            Log("Job started");
            jobDescriptor.JobCompletedEvent.WaitOne();
            Log("Job completed");
        }