简体   繁体   English

AWS Glue Boto3 - 在哪里可以找到服务员名单?

[英]AWS Glue Boto3 - Where can I find the list of the waiters?

I'm trying to kick off an AWS Glue ETL job in my Python script and check the status of it until the job finishes.我正在尝试在我的 Python 脚本中启动 AWS Glue ETL 作业并检查它的状态,直到作业完成。

Initially I just did a simple while loop, which waits for 1 minute and checks the job status.最初我只是做了一个简单的 while 循环,它等待 1 分钟并检查作业状态。 Once the job finishes successfully, break the loop.作业成功完成后,打破循环。 While researching more about this approach, I found out about this thing called 'waiter'.在进一步研究这种方法时,我发现了一种叫做“服务员”的东西。

But the thing is that even though the 'get_waiter' method is available for the Glue client, I do see any waiters.但问题是,即使 'get_waiter' 方法可用于 Glue 客户端,我确实看到了任何服务员。

So when I run this...所以当我运行这个...

s3 = boto3.client('s3')
glue = boto3.client('glue')

print('s3 waiters')
print(s3.waiter_names)
print('glue waiters')
print(glue.waiter_names)

I get this...我明白了这个...

s3 waiters
[u'bucket_exists', u'bucket_not_exists', u'object_exists', u'object_not_exists']
glue waiters
[]    

So I'm wondering if there are actually waiters for AWS Glue.所以我想知道是否真的有 AWS Glue 的服务员。 If so, were can I find them?如果是这样,我能找到它们吗?

Some references I found: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue.html#Glue.Client.get_waiter我发现的一些参考资料: https : //boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue.html#Glue.Client.get_waiter

https://boto3.amazonaws.com/v1/documentation/api/latest/guide/clients.html#waiters https://boto3.amazonaws.com/v1/documentation/api/latest/guide/clients.html#waiters

If you want to know more about a service's waiters there are three main ways to find out more details:如果您想了解有关服务服务员的更多信息,可以通过三种主要方式了解更多详情:

  1. Check the boto3 documentation.检查 boto3 文档。 If a service has a waiter it will be listed there and how to use it.如果服务有服务员,它会在那里列出以及如何使用它。
  2. Print the waiter names in the code just as you mentioned in your question.正如您在问题中提到的那样,在代码中打印服务员姓名。
  3. Go to the botocore data folder in github and check your specific services for information about the waiters available.转到 github 中的botocore 数据文件夹并检查您的特定服务以获取有关可用服务员的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM