@@ -423,7 +423,6 @@ static MIGRATIONS: &[Migration] = &[
423423 started_at TIMESTAMP,
424424 finished_at TIMESTAMP,
425425 status TEXT,
426- retries INTEGER DEFAULT 0,
427426 PRIMARY KEY (sha, target)
428427 );
429428 "# ,
@@ -1396,58 +1395,6 @@ impl Connection for SqliteConnection {
13961395 )
13971396 }
13981397
1399- /* Check to see if this machine possibly went offline while doing
1400- * a previous job - if it did we'll take that job */
1401- let maybe_previous_job = self
1402- . raw_ref ( )
1403- . prepare (
1404- "
1405- WITH job_to_update AS (
1406- SELECT
1407- sha,
1408- parent_sha,
1409- commit_type,
1410- pr,
1411- release_tag,
1412- commit_time,
1413- target,
1414- include,
1415- exclude,
1416- runs,
1417- backends,
1418- machine_id,
1419- started_at,
1420- finished_at,
1421- status,
1422- retries
1423- FROM commit_queue
1424- WHERE machine_id = ?
1425- AND target = ?
1426- AND status = 'in_progress'
1427- AND retries < 3
1428- ORDER BY started_at
1429- LIMIT 1
1430- )
1431- UPDATE commit_queue AS cq
1432- SET started_at = DATETIME('now'),
1433- status = 'in_progress',
1434- retries = cq.retries + 1
1435- WHERE cq.sha = (SELECT sha FROM job_to_update)
1436- RETURNING *;
1437- " ,
1438- )
1439- . unwrap ( )
1440- . query_map ( params ! [ machine_id, & target] , |row| {
1441- Ok ( commit_queue_row_to_commit_job ( row) )
1442- } )
1443- . unwrap ( )
1444- . map ( |row| row. unwrap ( ) )
1445- . collect :: < Vec < CommitJob > > ( ) ;
1446-
1447- if let Some ( previous_job) = maybe_previous_job. first ( ) {
1448- return Some ( previous_job. clone ( ) ) ;
1449- }
1450-
14511398 /* Check to see if we are out of sync with other collectors of
14521399 * different architectures, if we are we will update the row and
14531400 * return this `sha` */
@@ -1471,8 +1418,7 @@ impl Connection for SqliteConnection {
14711418 machine_id,
14721419 started_at,
14731420 finished_at,
1474- status,
1475- retries
1421+ status
14761422 FROM commit_queue
14771423 WHERE target != ? AND status IN ('finished', 'in_progress')
14781424 ORDER BY started_at
@@ -1522,7 +1468,6 @@ impl Connection for SqliteConnection {
15221468 started_at,
15231469 finished_at,
15241470 status,
1525- retries,
15261471 CASE
15271472 WHEN commit_type = 'release' THEN 0
15281473 WHEN commit_type = 'master' THEN 1
0 commit comments