Nexus:未知任务称为“存储方面清理”

时间:2017-12-20 10:43:45

标签: nexus

我安装了Sonatype Nexus OSS 3.6.2-01 虽然我没有配置任何计划任务,但我可以在命令行中看到Nexus每十分钟运行一次名为“存储面清理”的任务。

由于我找不到任何有关此任务的信息,我终于来到这里了。

If Sheets("Tab 1 - Prijslijst").Range("DK" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("W" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DL" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("X" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DM" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("Y" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DN" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("Z" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DO" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AA" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DP" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AB" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DQ" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AC" & xlCell2.Row).Value Then
    If Sheets("Tab 1 - Prijslijst").Range("DR" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AD" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DS" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AE" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DT" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AF" & xlCell2.Row).Value Then
        If Sheets("Tab 1 - Prijslijst").Range("DU" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AG" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DV" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AH" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DW" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AI" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DX" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AJ" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DY" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AK" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DZ" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AL" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("EA" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AM" & xlCell2.Row).Value Then
            If Sheets("Tab 1 - Prijslijst").Range("EB" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AN" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("EC" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AO" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("ED" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("AP" & xlCell2.Row).Value Then
                If Sheets("Tab 1 - Prijslijst").Range("CQ" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("C" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("CR" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("D" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("CS" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("E" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("CT" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("F" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("CU" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("G" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("CV" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("H" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("CW" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("I" & xlCell2.Row).Value Then
                    If Sheets("Tab 1 - Prijslijst").Range("CX" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("J" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("CY" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("K" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("CZ" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("L" & xlCell2.Row).Value Then
                        If Sheets("Tab 1 - Prijslijst").Range("DA" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("M" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DB" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("N" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DC" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("O" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DD" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("P" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DE" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("Q" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DF" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("R" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DG" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("S" & xlCell2.Row).Value Then
                            If Sheets("Tab 1 - Prijslijst").Range("DH" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("T" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DI" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("U" & xlCell2.Row).Value And Sheets("Tab 1 - Prijslijst").Range("DJ" & xlCell3.Row).Value = Sheets("Tab 2 - Nieuwe prijzen").Range("V" & xlCell2.Row).Value Then

                            '----------
                            ' Code that is irrelevant to the question
                            '----------

                            Else
                                Call ntofourty(xlCell3, xlCell2)
                            End If
                        Else
                            Call ntofourty(xlCell3, xlCell2)
                        End If
                    Else
                        Call ntofourty(xlCell3, xlCell2)
                    End If
                Else
                    Call ntofourty(xlCell3, xlCell2)
                End If
            Else
                Call ntofourty(xlCell3, xlCell2)
            End If
        Else
            Call ntofourty(xlCell3, xlCell2)
        End If
    Else
        Call ntofourty(xlCell3, xlCell2)
    End If
Else
    Call ntofourty(xlCell3, xlCell2)
End If

这项任务是什么?

为什么在管理面板的“任务”部分中看不到它?

有没有办法禁用此任务(或将其配置为仅在晚上运行)?

2 个答案:

答案 0 :(得分:1)

这是一项清理任务,需要让NXRM正确运行。它未列出,因为它不可消除/可配置。

答案 1 :(得分:0)

这是在类StorageFacetCleanupTask中定义的清理任务,该任务在performDeletions()上运行storageFacetManager

 @Override
  protected Void execute() throws Exception {
    thread = Thread.currentThread();
    long count;
    do {
      count = storageFacetManager.performDeletions();
    }
    while (count > 0 && !isCanceled());
    return null;
}

方法performDeletions是在StorageFacetManagerImpl中定义的,它会删除所有标有P_PENDING_DELETION的存储桶:

    @Override
      @Guarded(by = STARTED)
      public long performDeletions() {
        List<Bucket> buckets = findBucketsForDeletion();
        return buckets.stream().filter((bucket) -> {
          try {
            log.info("Deleting bucket for repository {}", bucket.getRepositoryName());
            deleteBucket(bucket);
            return true;
          }
          catch (Exception e) {
            log.warn("Unable to delete bucket with repository name {}, will require manual cleanup",
                bucket.getRepositoryName(), e);
            return false;
          }
        }).count();
      }

标记为P_PENDING_DELETION的所有存储桶均由findBucketsForDeletion收集在StorageFacetManagerImpl中:

private List<Bucket> findBucketsForDeletion() {
    return inTx(databaseInstanceProvider).call(db -> {
      return StreamSupport
          .stream(bucketEntityAdapter.browse(db).spliterator(), false)
          .filter((bucket) -> bucket.attributes().contains(P_PENDING_DELETION))
          .collect(Collectors.toList());
    });
}