CBleunven
13 years agoContributor
execution in parrallel of two functions
Hi,
I'm looking to automatically add a bug in tfs when an error occurs. For this I add an OnLogError event handler and use the IssueTracking object. This allows me to populate the various field of the bug report with the required values.
In order to centralize information at the maximum, I would like to add a copy of the Log with the error. But the log entry that regards the error will be added only after leaving the GeneralEvents_OnLogError(Sender, LogParams) method so the Log copy I can made (with Log["SaveResultsAs"]) at this point is not satisfying.
Is there a way to delay the addition of the log copy after the log entry has been added. something like this in "pseudo code"
I had a look to use NetworkSuite - Jobs - Task but I guess it's not really intended for this use and so it may be a problem to start the job on the same computer.
Thanks for help,
Christophe
I'm looking to automatically add a bug in tfs when an error occurs. For this I add an OnLogError event handler and use the IssueTracking object. This allows me to populate the various field of the bug report with the required values.
In order to centralize information at the maximum, I would like to add a copy of the Log with the error. But the log entry that regards the error will be added only after leaving the GeneralEvents_OnLogError(Sender, LogParams) method so the Log copy I can made (with Log["SaveResultsAs"]) at this point is not satisfying.
Is there a way to delay the addition of the log copy after the log entry has been added. something like this in "pseudo code"
function GeneralEvents_OnLogError(Sender, LogParams)
{
//prepare the bug information
item = IssueTracking["MyTemplate"]( blablabla );
Start_in_parallel ( attachTheFile(item) );
//immediately continue
}
function attachTheFile(item)
{
Delay (1000); //like this the event will be treated until the end and the log entry added
Log["SaveResultsAs"](logPath,lsMHT);
item["AttachFile"](logPath);
}
I had a look to use NetworkSuite - Jobs - Task but I guess it's not really intended for this use and so it may be a problem to start the job on the same computer.
Thanks for help,
Christophe