Apache骆驼,第二次无法从FTP获取文件

时间:2020-09-30 08:02:54

标签: spring-boot apache-camel

我的表情是这样的:

<button id="eventbtn2" class="mybtn" name="button">Button1</button>
<div id="myeventModal" class="eventsmodal">
  <!-- Modal content -->
  <div class="modalevents-content">
    <div class="modalevents-header">
      <span class="close">&times;</span>
      <h2>This is the events modal</h2>
    </div>
    <div class="modalevents-body">
      <p>Some text in the Modal Body</p>
      <p>Some other text...</p>
    </div>
    <div class="modalevents-footer">
       <h3>Modal Footer</h3>
    </div>
  </div>
</div>

我在这里使用此表达式:

var modal = document.getElementById("myeventModal");
    
// Get the button that opens the modal
var btn = document.getElementById("eventbtn2");
    
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
    
// When the user clicks the button, open the modal
btn.onclick = function() {
  modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
  modal.style.display = "none";
}
    
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
  if (event.target == modal) {
    modal.style.display = "none";
  }
}

在第一次执行时,它可以获取文件。但是第二次当我再次触发时,它会等待放置日志,如下所示:

# it installs php7.3-gd for the moment
# and restarts PHP 7.3 FastCGI Process Manager: php-fpm7.3.
sudo apt-get install php-gd

# after I've restarted Nginx
sudo /etc/init.d/nginx restart

继续前进,但由于文件为空,因此无法继续前进。

为什么不能第二次接收文件?我删除了文件,然后再次将其放入ftp,但仍然无法获取它。

当我在该表达式中提供文件名作为同一目录中的另一个文件名并尝试时,它可以获取文件。

第一个文件是否有无法再次获得的锁?

1 个答案:

答案 0 :(得分:1)

设置选项noop=true以在完成后禁止文件移动。您还需要idempotent=false才能禁用idempotency

请参见SFTP Component

noop

如果为true,则不会以任何方式移动或删除文件。该选项适用于只读数据或ETL类型要求。如果noop = true,Camel还将设置idempotent = true,以避免一遍又一遍地使用相同的文件。

idemponent

使用幂等消费者EIP模式的选项,使骆驼跳过已处理的文件。默认情况下,将使用可容纳1000个条目的基于内存的LRUCache。如果noop = true,则将启用幂等,以避免一遍又一遍地消耗相同的文件。