def METHOD_NAME():
    conf = read_conf()
    bucket_name = conf.get("bucket_name")
    spooldir = Path(conf.get("msmt_spool_dir"))
    format_char = "n"
    collector_id = conf.get("collector_id")
    identity = f"{format_char}{collector_id}"
    log.info(f"Uploader {collector_id} starting")
    assert collector_id, "collector_id is not set"
    log.info(f"Using bucket {bucket_name} and spool {spooldir}")
    s3 = create_s3_client(conf)
    db_conn = connect_to_db(conf)
    # Scan spool directories, by age
    idir = spooldir / "incoming"
    threshold = datetime.utcnow() - timedelta(hours=1)
    for hourdir in sorted(idir.iterdir()):
        if not hourdir.is_dir() or hourdir.suffix == ".tmp":
            continue
        try:
            tstamp, cc, testname = hourdir.name.split("_")
        except Exception:
            continue
        if len(tstamp) != 10:
            continue
        hourdir_time = datetime.strptime(tstamp, "%Y%m%d%H")
        if hourdir_time > threshold:
            log.info(f"Stopping before {hourdir_time}")
            break
        log.info(f"Processing {hourdir}")
        # Split msmts across multiple postcans and jsonl files
        can_cnt = 0
        while True:
            # Compress raw POSTs into a tar.gz postcan
            postcanf = hourdir.with_suffix(f".{identity}.{can_cnt}.tar.gz")
            jsonlf = hourdir.with_suffix(f".{identity}.{can_cnt}.jsonl.gz")
            msmfiles = fill_postcan(hourdir, postcanf)
            if len(msmfiles) == 0:
                break
            # Also create jsonl file and delete msmt POSTs
            lookup_list = fill_jsonl(msmfiles, jsonlf)
            delete_msmt_posts(msmfiles)
            # Upload current postcan to S3
            postcan_s3path = (
                f"raw/{tstamp[:8]}/{tstamp[8:10]}/{cc}/{testname}/{postcanf.name}"
            )
            jsonl_s3path = (
                f"raw/{tstamp[:8]}/{tstamp[8:10]}/{cc}/{testname}/{jsonlf.name}"
            )
            if conf.get("run_mode", "") == "DESTROY_DATA":
                log.info("Testbed mode: Destroying postcans!")
            else:
                upload_to_s3(s3, bucket_name, postcanf, postcan_s3path)
                upload_to_s3(s3, bucket_name, jsonlf, jsonl_s3path)
                update_db_table(db_conn, lookup_list, jsonl_s3path)
            postcanf.unlink()
            jsonlf.unlink()
            can_cnt += 1
            metrics.incr("postcan_count")
        # Delete whole hourly directory
        for f in sorted(hourdir.iterdir()):
            f.unlink()
        hourdir.rmdir()
    log.info("Exiting")