-------------------------------------------------------------------------------
date: 2004/04/21 20:24:36;  author: galt;
Added cgi program qaPushQ to maintain the Push Queue for ucsc genome project.
hg.conf has new "pq."-entries.
Program goes in cgi-bin.
Uses db qapushq with tables pushQ and users.
New user qauser on dev and beta
Allows PushQ records to be entered and edited.
Columns can be re-arranged or hidden. Rows can be prioritized.
 
Users must login and if password is blank in qapushq.users, it stores
an MD5 hash of the password using extended linux crypt(3), becoming the new password.
  
When pushing, it checks to make sure that joiner, index, and makedoc
have been verified, and that the size field is not blank.

To prevent lost updates record-lock fields are implemented.

To prevent incorrect states or accidentally reposting twice,
 cache-busting cb=randomDigits is added to all links and forms except popup help.

backdoor to unlock a record:
add action=unlock&qid=000027 as URL parms to cgi-bin/qaPushQ will unlock record 27.

Currently users must be added manually to the database
  (note the role should eeither be 'qa' or 'dev'):
hgsql qapushq
insert into users values ('newname','','dev','');

To clear the password:
update users set password='' where user='theuser';
To empty the pseudo-cart:
update users set content='' where user='theuser';

(NOTE: since qapushq cookie was expanded to .cse.ucsc.edu,
the following trick should not be required)
Now that we are using the qaPushQ cgi on hgwdev
in a hack that lets us read the files on dev even from beta,
this means that the user table on dev needs updating.
I currently just dump in from hgwbeta and load it into dev:
 ssh hgwdev
 hgsql qapushq -e 'drop table users'
 hgsqldump -h hgwbeta qapushq users | hgsql qapushq

Notes for qaPushQ gateway, adding new queues:
CREATE TABLE hg17 (UNIQUE (qid)) SELECT * FROM pushQ;
delete from hg17;
this will dupe the table structure.

A new template that may be useful for staging new assemblies:
CREATE TABLE newAssm (UNIQUE (qid)) SELECT * FROM zTemplate;


when the new org/assembly has been finished and the separate staging queue is 
no longer needed, make a way to quickly append its records
to the end of the main queue and clear out or delete the separate queue tbl.
This has now been done as ~galt/retirePushQ.csh

=============================================================================
   

