05 January 2007

so how does it all come together

This is the next post in the thread on the chore allocation and tracking tool (CAATT, pronounced like "Kahn!!"). Previously I laid out the database schema for it, I've already put it into my database, and created two users, 'caatt' and 'caatts' which have rights to the database. Here's a dump of what's there:

mysql> explain tasks;
+---------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+----------------------+------+-----+---------+----------------+
| task_id | tinyint(3) unsigned | NO | PRI | NULL | auto_increment |
| short_name | varchar(128) | NO | | | |
| description | varchar(4096) | YES | | NULL | |
| minutes | tinyint(3) unsigned | NO | | | |
| sched_process | tinyint(3) unsigned | NO | | 0 | |
| sched_offset | date | YES | | NULL | |
| sched_order | tinyint(3) unsigned | YES | | NULL | |
| usual_doer | smallint(5) unsigned | YES | | NULL | |
+---------------+----------------------+------+-----+---------+----------------+
8 rows in set (0.00 sec)
mysql> explain work_queue;
+----------+----------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+----------------------+------+-----+---------------------+----------------+
| work_id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| input | timestamp | NO | | CURRENT_TIMESTAMP | |
| output | timestamp | NO | | 0000-00-00 00:00:00 | |
| task | tinyint(3) unsigned | NO | | | |
| comments | varchar(4096) | YES | | NULL | |
| doer | smallint(5) unsigned | YES | | NULL | |
+----------+----------------------+------+-----+---------------------+----------------+
6 rows in set (0.01 sec)
mysql> select User,Table_name,Table_priv from tables_priv where Db='caatt';
+--------+------------+----------------------+
| User | Table_name | Table_priv |
+--------+------------+----------------------+
| caatt | work_queue | Select,Update |
| caatts | work_queue | Select,Insert,Update |
| caatt | tasks | Select |
| caatts | tasks | Select |
+--------+------------+----------------------+
4 rows in set (0.00 sec)


I'll setup and maintain the tasks list by hand, as root, for now. The caatts user is the one that will assign work, the caatt user is the one that will be used for the general access clients.

But where did all those clients come from?

OK, so there will be two parts to the clients for this... a scheduler and a todo list. The scheduler will be a unix script, probably bash or perl, run by cron. It will come out and see what needs to be done, and add it to various lists, probably at like 4 in the morning or something. The big part of this will be the todo list gui. I'll write it as a cocoa gui. First though, I need to find an sql framework....

Labels: ,

1 Comments:

Blogger cabbey said...

hahahahaha

so preformatted code blocks look even worse!


sad.

8:59 PM  

Post a Comment

<< Home