Skip to content

Commit faa7e34

Browse files
KixironJoshua Nelson
authored andcommitted
Removed 'move-to-s3'
1 parent 949bc86 commit faa7e34

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/bin/cratesfyi.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,6 @@ impl BuildSubcommand {
349349

350350
#[derive(Debug, Clone, PartialEq, Eq, StructOpt)]
351351
enum DatabaseSubcommand {
352-
#[structopt(name = "move-to-s3")]
353-
MoveToS3,
354-
355352
/// Run database migrations
356353
Migrate {
357354
/// The database version to migrate to
@@ -394,21 +391,6 @@ enum DatabaseSubcommand {
394391
impl DatabaseSubcommand {
395392
pub fn handle_args(self) {
396393
match self {
397-
Self::MoveToS3 => {
398-
let conn = db::connect_db().expect("failed to connect to the database");
399-
400-
let (mut count, mut total) = (1, 0);
401-
while count != 0 {
402-
count = db::move_to_s3(&conn, 5_000).expect("Failed to upload batch to S3");
403-
total += count;
404-
405-
eprintln!(
406-
"moved {} rows to s3 in this batch, total moved so far: {}",
407-
count, total
408-
);
409-
}
410-
}
411-
412394
Self::Migrate { version } => {
413395
let conn = connect_db().expect("failed to connect to the database");
414396
db::migrate(version, &conn).expect("Failed to run database migrations");

0 commit comments

Comments
 (0)