[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Pyatcron-devel-list] Task list in the main window

From: Julien Olivier
Subject: RE: [Pyatcron-devel-list] Task list in the main window
Date: Wed, 12 Nov 2003 22:28:21 +0000

> Right.  For a Task class would we have all the information defining the
> task.  Last night I kept thinking, I wonder if python has something
> similar to a C structure.  Then this morning I realized, oh yeah, all I
> need to do is make a class.  :)  Now that I'm thinking on the right
> level, these are my thoughts:
> First we have a PyAtCronTask class that contains all the Task
> attributes, like the following:
>       o Task Name
>       o Task Type - Separate class 
>       o Schedule - Separate class
>       o Status - Active/Inactive
>       o (any others? This is all I can think of right off hand)
> The task type would be a class that I guess will be dynamically loaded.
> Is that what we decided?

I'm not sure here. I would prefer that:

a PyAtCronTask class with:
 o Task Name
 o Task comment ?
 o Schedule (separate class)
 o Status
 o ...

And, then, several sub-classes inheriting this class. For example:

a PyAtCronTaskBackup, instance of PyAtCronTask with some additional
 o Path of the folder to backup
 o Type of compression (tgz, bz2, zip...)
 o Path of the destination folder (holding the backups)
 o Format of the archive's name
 o ...

> Then the PyAtCronTaskSchedule class would hold all the minutes, hours,
> days, etc that the task would run.

I agree.

> Does this make sense?  Any comments?

It makes sense, except for the type class, where I prefer an

> Oh yeah, I did forget that.

And don't forget to save/restore the cursor (like I did in the code I
sent you). Else, the selection will be lost each time you refresh the

Julien Olivier <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]