void processJob() {
    boolean success = false;
    UUID jobId = JobMetadata.getJobId();
    monitor.debug(() -> format("Begin processing jobId: %s", jobId), EventCode.WORKER_JOB_STARTED);
    AuthData exportAuthData = null;
    AuthData importAuthData = null;

    try {
      markJobStarted(jobId);
      hooks.jobStarted(jobId);

      PortabilityJob job = store.findJob(jobId);
      JobAuthorization jobAuthorization = job.jobAuthorization();

      monitor.debug(
          () ->
              format(
                  "Starting copy job, id: %s, source: %s, destination: %s",
                  jobId, job.exportService(), job.importService()));

      String scheme = jobAuthorization.encryptionScheme();
      AuthDataDecryptService decryptService = getAuthDecryptService(scheme);
      if (decryptService == null) {
        monitor.severe(
            () ->
                format(
                    "No auth decrypter found for scheme %s while processing job: %s",
                    scheme, jobId));
        return;
      }

      String encrypted = jobAuthorization.encryptedAuthData();
      byte[] encodedPrivateKey = JobMetadata.getPrivateKey();
      AuthDataPair pair = decryptService.decrypt(encrypted, encodedPrivateKey);

      exportAuthData = objectMapper.readValue(pair.getExportAuthData(), AuthData.class);
      importAuthData = objectMapper.readValue(pair.getImportAuthData(), AuthData.class);

      String exportInfoStr = job.exportInformation();
      Optional<ExportInformation> exportInfo = Optional.empty();
      if (!Strings.isNullOrEmpty(exportInfoStr)) {
        exportInfo = Optional.ofNullable(objectMapper.readValue(exportInfoStr, ExportInformation.class));
      }

      // Copy the data
      dtpInternalMetricRecorder.startedJob(
          JobMetadata.getDataType(),
          JobMetadata.getExportService(),
          JobMetadata.getImportService());
      JobMetadata.getStopWatch().start();
      sendSignals(jobId, exportAuthData, importAuthData, JobLifeCycle.JOB_STARTED(), monitor);
      copier.copy(exportAuthData, importAuthData, jobId, exportInfo);
      success = true;
    } catch (CopyExceptionWithFailureReason e) {
      String failureReason = e.getFailureReason();
      if (failureReason.contains(FailureReasons.DESTINATION_FULL.toString())) {
        monitor.info(() -> "The remaining storage in the user's account is not enough to perform this operation.", e);
      } else if (failureReason.contains(FailureReasons.INVALID_TOKEN.toString())  ||
              failureReason.contains(FailureReasons.SESSION_INVALIDATED.toString())  ||
              failureReason.contains(FailureReasons.UNCONFIRMED_USER.toString())  ||
              failureReason.contains(FailureReasons.USER_CHECKPOINTED.toString())) {
        monitor.info(() -> "Got token error", e);
      } else {
        monitor.severe(
                () ->
                        format(
                                "Error with failure code '%s' while processing jobId: %s",
                                failureReason, jobId),
                e,
                EventCode.WORKER_JOB_ERRORED);
      }
      addFailureReasonToJob(jobId, failureReason);
    } catch (IOException | CopyException | RuntimeException e) {
      monitor.severe(() -> "Error processing jobId: " + jobId, e, EventCode.WORKER_JOB_ERRORED);
    } finally {
      // The errors returned by copier.getErrors are those logged by the idempotentImportExecutor
      // and are distinct from the exceptions thrown by copier.copy
      final Collection<ErrorDetail> loggedErrors = copier.getErrors(jobId);
      final int numErrors = loggedErrors.size();
      // success is set to true above if copy returned without throwing
      success &= loggedErrors.isEmpty();
      monitor.debug(
          () -> format("Finished processing jobId: %s with %d error(s).", jobId, numErrors),
          EventCode.WORKER_JOB_FINISHED);
      addErrorsAndMarkJobFinished(jobId, success, loggedErrors);
      hooks.jobFinished(jobId, success);
      JobLifeCycle finalStatus = deriveFinalJobStatus(success);
      sendSignals(jobId, exportAuthData, importAuthData, finalStatus, monitor);
      dtpInternalMetricRecorder.finishedJob(
          JobMetadata.getDataType(),
          JobMetadata.getExportService(),
          JobMetadata.getImportService(),
          success,
          JobMetadata.getStopWatch().elapsed());
      monitor.flushLogs();
      JobMetadata.reset();
    }
  }
Process our job, whose metadata is available via {@link JobMetadata}.
portability-transfer/src/main/java/org/datatransferproject/transfer/JobProcessor.java