Re: Email notification pgAgent

Поиск
Список
Период
Сортировка
От Jasmin Dizdarevic
Тема Re: Email notification pgAgent
Дата
Msg-id AANLkTimh8rkKBbqH9dcXJJugzZap_2_9uZ5GFM8YE8Xm@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Email notification pgAgent  (Dave Page <dpage@pgadmin.org>)
Ответы Re: Email notification pgAgent  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-hackers
Hi Dave,

P3 is a good idea. 
I think the best way to configure notifications is on a per job level. So I need two fields in the pga_job table:

alter table pgagent.pga_job add column jobmailnotkind varchar(7) check (jobmailnotkind in ('Success','Failure','Both'));
alter table pgagent.pga_job add column jobmailnotrecp varchar(320);

The SMTP server address is going to be an optional cl-argument (-s). 

If this is going into a release. Can I assume that the fields are present, even if pgagent is compiled without mail notification?
Background: I think, it would be inefficient to perform an extra select between #ifdef MAIL_NOTIFICATION and #endif, so I would change this statement in the Job::Execute() method.
"select * from pgagent.pga_jobstep
where jstenabled and jstjobid = ?
order by jstname, jstid" 
to
"select js.*, j.jobmailnotkind, j.jobmailnotrecp from pgagent.pga_jobstep js
inner join pgagent.pga_job j on js.jstjobid = j.jobid
where js.jstenabled and js.jstjobid = ?
order by js.jstname, js.jstid"

Maybe, my questions seems to be silly, sorry for that. It's my first try to contribute to an open source project.

Jasmin



2010/12/27 Dave Page <dpage@pgadmin.org>
Hi

On Mon, Dec 27, 2010 at 2:32 AM, Jasmin Dizdarevic
<jasmin.dizdarevic@gmail.com> wrote:
> Hi,
> we've just decided to use pgAgent in our company, so I set it up and
> discovered that there is no email notification support on failures.
> I've decided to add this functionality, but I have some questions:
> 1. Have there been any plans to add mail notification in the past?

No.

> 2. Is the feature desirable?

It seems like a reasonable addition.

> 3. I'm absolutely new to wxwidgets: Is wxSMTP a good idea?
> (http://wiki.wxwidgets.org/WxSMTP)

That seems like a good way forward, though to reduce the requirements
on users who don't need it, the email feature should really be made
optional, so if the user doesn't want it, they don't need the
additional module to build pgAgent.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: utffile symbol defined is strange.
Следующее
От: Dave Page
Дата:
Сообщение: Re: Email notification pgAgent