小编Awa*_*wad的帖子

如何增加AWS Lambda客户端的超时

我正在尝试使用 AWS Lambda 扫描文件,但由于扫描功能花费的时间比预期长,因此出现超时。

我想增加客户端的超时时间,因为这个过程是@Async,我可以再处理几秒钟。

这是我的方法:

   @Override
   @Async
   public void scanFile( String s3Bucket, String fileName, String path, String documentId, String createdBy ) throws IOException {

      FileScanInput input = new FileScanInput();
      input.setS3Bucket( s3Bucket );
      input.setS3Key( path );

      logger.debug( "Scan file: " + path + ", in S3 bucket:  " + s3Bucket );
      if ( fileScanService == null ) {
         fileScanService = buildFileScanService();
      }

      FileScanOutput fileScanOutput = fileScanService.scanFile( input );
//      TODO: if the scan process failed, ask what should be the …
Run Code Online (Sandbox Code Playgroud)

java asynchronous amazon-s3 aws-lambda

9
推荐指数
2
解决办法
3万
查看次数

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code

I am trying to run a Jmeter test on remote machine ( macOS sierraO). I configured jp@gc - Chrome Driver Config and I can connect to the slave machine. However, whenever I try to run it I get

Starting ChromeDriver 73.0.3683.20 (XXXXXXX) on port XXXX
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Mar 08, 2019 12:12:35 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Using local port: …
Run Code Online (Sandbox Code Playgroud)

jmeter jmeter-plugins jmeter-maven-plugin

4
推荐指数
2
解决办法
4万
查看次数

如何在 Swift 中从自定义编码/解码的 json 中删除数据模型 nil 字段

我正在尝试找到一种干净的方法来删除数据模型可选属性(如果nil在 Swift 中自定义编码/解码我的数据模型)。

我的用例:

import Foundation

public struct Message {
    public let txnID: UUID
    public var userId: String?
    public var messageID: UUID?
    public init(txnID: UUID, userId: String? = nil, messageID: UUID? = nil) {
        self.txnID = txnID
        self.userId = userId
        self.messageID = messageID
    }
}


extension Message: Codable {
    private enum CodingKeys: CodingKey {
        case txnID, userId, messageID
    }

    public init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        txnID = try container.decode(UUID.self, forKey: .txnID)
        // …
Run Code Online (Sandbox Code Playgroud)

swift codable decodable

2
推荐指数
1
解决办法
2198
查看次数

不同环境的不同 S3 存储桶 VS 一个存储桶和每个环境的不同对象

我迁移我的应用程序以开始使用 S3,但问题是我现在不确定不同环境的最佳实践是否是使用多个存储桶?或者我应该为每个环境创建一个包含多个对象的存储桶。

喜欢:

  • 我的文档阿尔法
  • 我的文档测试版
  • 我的文档伽马
  • 我的文档

或者 - 我的文档有:

  1. α/
  2. 测试版/
  3. 伽马/
  4. 产地/

amazon-s3 amazon-web-services

0
推荐指数
1
解决办法
933
查看次数

如何记录基于 spring boot (tomcat) 的应用程序中可用/已用线程的数量?

是否有一个 Spring Boot 配置,您可以在其中记录应用程序服务器当前拥有的可用/已使用线程的数量?

java spring-boot

0
推荐指数
1
解决办法
4318
查看次数