Re: pgAgent reports failure upon success

Поиск
Список
Период
Сортировка
От Martin French
Тема Re: pgAgent reports failure upon success
Дата
Msg-id OFD2ABAB81.DF6CCFE4-ON80257A38.0023E9F0-80257A38.00244C9F@LocalDomain
обсуждение исходный текст
Ответ на Re: pgAgent reports failure upon success  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-support
<p><font face="sans-serif" size="2">Hi</font><br /><br /><tt><font size="2">pgadmin-support-owner@postgresql.org wrote
on10/07/2012 16:05:18:<br /><br />> From: Dave Page <dpage@pgadmin.org></font></tt><br /><tt><font
size="2">>To: Martin French <Martin.French@romaxtech.com>, </font></tt><br /><tt><font size="2">> Cc:
pgadmin-support@postgresql.org,pgadmin-support-owner@postgresql.org</font></tt><br /><tt><font size="2">> Date:
10/07/201219:12</font></tt><br /><tt><font size="2">> Subject: Re: [pgadmin-support] pgAgent reports failure upon
success</font></tt><br/><tt><font size="2">> Sent by: pgadmin-support-owner@postgresql.org</font></tt><br
/><tt><fontsize="2">> <br />> On Tue, Jul 10, 2012 at 1:57 PM, Martin French<br />>
<Martin.French@romaxtech.com>wrote:<br />> > Hi<br />> ><br />> > Thanks for the feedback. I
certainlywon't be discouraged by it! :)<br />> <br />> :-)<br />> <br />> >> - You have member name
of[Get|Set]LastResult which set/return a<br />> >> member variable called lastStatus. These should be
consistentto avoid<br />> >> confusion.<br />> ><br />> > Will amend accordingly.<br />> <br
/>>Thanks.<br />> <br />> >> - Rather than setting lastStatus to 0 or -1, why not set it to<br />>
>>PQresultStatus(). That seems like it would be more useful in the<br />> >> future (and potentially in
thelog files).<br />> ><br />> > I'd set it to only two values, as it made the comparison easier. As I
see<br/>> > it, ExecStatusType ENUM can be anyone of 0 - 8 inclusive, but some of those<br />> > are error
messages,so it'd either have to determine which ones are OK and<br />> > which are not either with a case
statementor with an extended "if". Happy<br />> > to code that in along the lines of (or inverse, testing for
fails...):<br/>> ><br />> > switch (rc)<br />> > {<br />> > case PGRES_COMMAND_OK:<br />>
>case PGRES_TUPLES_OK:<br />> > case PGRES_COPY_OUT:<br />> > case PGRES_COPY_IN:<br />> > case
PGRES_COPY_BOTH:<br/>> ><br />> > stepstatus = wxT("s");<br />> > break;<br />> > default:<br
/>>><br />> > stepstatus = steps->GetString(wxT("jstonerror"));<br />> > break<br />> > }<br
/>>><br />> > If you think that's a more viable option? Let me know and I'll sort it :)<br />> <br
/>>That's a little more complex for this case, but I think it'll make the<br />> dbconn class more useful for the
future.You could of course wrap that<br />> switch statement up in the class as well, and offer another public<br
/>>member that returns a simple boolean indicating if the last status was<br />> a success or failure.<br
/></font></tt><br/><tt><font size="2">Agreed, I'll see what I can put together today (time permitting). </font></tt><br
/><br/><tt><font size="2">> <br />> >> - When creating the diff, please use "git diff", or if working from
a<br/>> >> source tarball (not recommended for development) - take 2 copies and<br />> >> then diff
them,eg "diff -c -r pgagent-src/ pgagent-src.orig/ ><br />> >> mypatch.diff". That'll put the entire patch
inone file, which makes<br />> >> it much easier to handle and reapply.<br />> ><br />> > I'm
afraidI'm limited to source tarballs at the moment. Attempting to pull<br />> > from git gives me "Connection
Refused".So will create a single patch file<br />> > using the method suggested.<br />> <br />> Hmm, this
worksfor me:<br />> <br />> git clone git://git.postgresql.org/git/pgagent.git<br />> <br />> or, if you're
ona network that blocks the git protocol, you might <br />> want to try:<br />> <br />> git clone <a
href="http://git.postgresql.org/git/pgagent.git">http://git.postgresql.org/git/pgagent.git</a><br/>> <br />>
Pleaselet me know if that doesn't work, as I'm one of the admins for<br />> that server as well so obviously want to
fixany problems.<br />> </font></tt><br /><tt><font size="2">The http link works now. I think the problem was this
end,as it's a new VM I'm using, so is not configured perhaps as well as It should be!</font></tt><br /><tt><font
size="2"><br/>Cheers</font></tt><br /><br /><tt><font size="2">Martin.</font></tt><font
face="sans-serif">=============================================Romax Technology Limited Rutherford House Nottingham
Science& Technology Park Nottingham, NG7 2PZ England Telephone numbers: +44 (0)115 951 88 00 (main) For other
officelocations see: http://www.romaxtech.com/Contact ================================= =============== E-mail:
info@romaxtech.comWebsite: www.romaxtech.com ================================= ================ Confidentiality
StatementThis transmission is for the addressee only and contains information that is confidential and privileged.
Unlessyou are the named addressee, or authorised to receive it on behalf of the addressee you may not copy or use it,
ordisclose it to anyone else. If you have received this transmission in error please delete from your system and
contactthe sender. Thank you for your cooperation. =================================================</font> 

В списке pgadmin-support по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: pgAgent reports failure upon success
Следующее
От: Maada Moseray
Дата:
Сообщение: PLEASE UNSUBSCRIBE IMMEDIATELY