Is the db_purge working in the latest and greatest from Git?

I'm using it like this
db_purge -min_age_days 14 --max_wu_per_file 10000 --gzip --daily_dir --one_pass 
-d 3

Looking at the code in db_purge.cpp the do_pass routine
    bool did_something = false;
    DB_WORKUNIT wu;
    char buf[256];

    if (min_age_days) {
        min_age_seconds = (int) min_age_days*86400;
        if (id_modulus) {
            sprintf(buf,
                "where file_delete_state=%d and mod_time<current_timestamp() - 
interval %d second and id %% %d = %d limit %d",
                FILE_DELETE_DONE, min_age_seconds, id_modulus, id_remainder, 
DB_QUERY_LIMIT
            );
        } else {
            sprintf(buf,
                "where file_delete_state=%d and mod_time<current_timestamp() - 
interval %d second limit %d",
                FILE_DELETE_DONE, min_age_seconds, DB_QUERY_LIMIT
            );
        }
    } else {
        if (id_modulus) {
            sprintf(buf,
                "where file_delete_state=%d and id %% %d = %d limit %d",
                FILE_DELETE_DONE, id_modulus, id_remainder, DB_QUERY_LIMIT
            );
        } else {
            sprintf(buf,
                "where file_delete_state=%d limit %d",
                FILE_DELETE_DONE, DB_QUERY_LIMIT
            );
        }
    }

    int n=0;
    while (1) {
        retval = wu.enumerate(buf);
        if (retval) {


The code should create the where clause
where file_delete_state=%d and mod_time<current_timestamp() - interval %d 
second limit %d

But in my database for work units mod_time is null for everything. Looking at 
file_deleter.cpp it seems to only set file_delete_state.

Anyone seen anything like this before?

Regards

Kevin



_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to