                             cb("already archived")
                         else
                             project_id = x.project_id
+                            last_active = x.last_active
                             cb()
             (cb) =>
+                if last_active? and last_active >= cutoff
+                    cb(); return
                 dbg("get patches")
                 @_query
                     query : "SELECT extract(epoch from time) as epoch, * FROM patches"

                    where : where
                    cb    : cb
            (cb) =>
                dbg("actually delete patches")
                @_query
                    query : "DELETE FROM patches"

            level     : -1   # the default
            cb        : undefined
        dbg = @_dbg("archive_patches(string_id='#{opts.string_id}')")
        syncstring = patches = blob_uuid = project_id = last_active =undefined
        cutoff = misc.minutes_ago(30)
        where = {"string_id = $::CHAR(40)" : opts.string_id}
        async.series([
            (cb) =>
                dbg("get project_id")
                @_query
                    query : "SELECT project_id, archived, last_active FROM syncstrings"
                    where : where
                    cb    : one_result (err, x) =>
                        if err
