Skip to content

Commit d005d8b

Browse files
committed
worker/Environment: Remove unused uploader field
1 parent 0f5cabc commit d005d8b

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

src/background_jobs.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use crate::db::ConnectionPool;
1010
use crate::storage::Storage;
1111
use crate::swirl::errors::EnqueueError;
1212
use crate::swirl::PerformError;
13-
use crate::uploaders::Uploader;
1413
use crate::worker;
1514
use crate::worker::cloudfront::CloudFront;
1615
use crate::worker::fastly::Fastly;
@@ -294,7 +293,6 @@ pub struct RenderAndUploadReadmeJob {
294293

295294
pub struct Environment {
296295
index: Arc<Mutex<Repository>>,
297-
pub uploader: Uploader,
298296
http_client: AssertUnwindSafe<Client>,
299297
cloudfront: Option<CloudFront>,
300298
fastly: Option<Fastly>,
@@ -304,15 +302,13 @@ pub struct Environment {
304302
impl Environment {
305303
pub fn new(
306304
index: Repository,
307-
uploader: Uploader,
308305
http_client: Client,
309306
cloudfront: Option<CloudFront>,
310307
fastly: Option<Fastly>,
311308
storage: Arc<Storage>,
312309
) -> Self {
313310
Self::new_shared(
314311
Arc::new(Mutex::new(index)),
315-
uploader,
316312
http_client,
317313
cloudfront,
318314
fastly,
@@ -322,15 +318,13 @@ impl Environment {
322318

323319
pub fn new_shared(
324320
index: Arc<Mutex<Repository>>,
325-
uploader: Uploader,
326321
http_client: Client,
327322
cloudfront: Option<CloudFront>,
328323
fastly: Option<Fastly>,
329324
storage: Arc<Storage>,
330325
) -> Self {
331326
Self {
332327
index,
333-
uploader,
334328
http_client: AssertUnwindSafe(http_client),
335329
cloudfront,
336330
fastly,

src/bin/background-worker.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ fn main() {
4040
info!("Booting runner");
4141

4242
let config = config::Server::default();
43-
let uploader = config.base.uploader();
4443

4544
if config.db.are_all_read_only() {
4645
loop {
@@ -83,14 +82,7 @@ fn main() {
8382
.build()
8483
.expect("Couldn't build client");
8584

86-
let environment = Environment::new_shared(
87-
repository,
88-
uploader.clone(),
89-
client,
90-
cloudfront,
91-
fastly,
92-
storage,
93-
);
85+
let environment = Environment::new_shared(repository, client, cloudfront, fastly, storage);
9486

9587
let environment = Arc::new(Some(environment));
9688

src/tests/util/test_app.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ impl TestAppBuilder {
259259
let index = WorkerRepository::open(&repository_config).expect("Could not clone index");
260260
let environment = Environment::new(
261261
index,
262-
app.config.uploader().clone(),
263262
app.http_client().clone(),
264263
None,
265264
None,

0 commit comments

Comments
 (0)