公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.data.newTaskId
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
为长时间运行的任务生成“未提交”ID。
在提交任务之前,系统可能会为其分配 ID 以便跟踪。服务器会确保同一 ID 不会被重复使用。这些 ID 采用 UUID 格式:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx。
在服务器上运行的任务的 ID 不含连字符。由 ee.data.startProcessing 和其他批处理方法返回。
返回一个包含生成的 ID 字符串的数组;如果指定了回调,则返回 null。
用法 | 返回 |
---|
ee.data.newTaskId(count, callback) | List<String> |
参数 | 类型 | 详细信息 |
---|
count | 数字,可选 | 要生成的 ID 数量,默认为 1。 |
callback | 函数(可选) | 可选的回调。如果未提供,则会同步进行调用。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eGenerates unique, unsubmitted IDs for pre-submission tracking of long-running tasks.\u003c/p\u003e\n"],["\u003cp\u003eThese IDs follow a UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) and are guaranteed to be unique by the server.\u003c/p\u003e\n"],["\u003cp\u003eRunning tasks on the server have IDs without hyphens, distinct from these pre-submission IDs.\u003c/p\u003e\n"],["\u003cp\u003eThe function \u003ccode\u003eee.data.newTaskId()\u003c/code\u003e generates these IDs and returns them as an array or via a callback.\u003c/p\u003e\n"]]],[],null,["# ee.data.newTaskId\n\n\u003cbr /\u003e\n\nGenerates an \"unsubmitted\" ID for a long-running task.\n\n\u003cbr /\u003e\n\nBefore tasks are submitted, they may be assigned IDs to track them. The server ensures that the same ID cannot be reused. These IDs have a UUID format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.\n\nTasks that are running on the server have a ID without hyphens. This is returned by ee.data.startProcessing and other batch methods.\n\nReturns an array containing generated ID strings, or null if a callback is specified.\n\n| Usage | Returns |\n|-----------------------------------------------|----------------|\n| `ee.data.newTaskId(`*count* `, `*callback*`)` | List\\\u003cString\\\u003e |\n\n| Argument | Type | Details |\n|------------|--------------------|------------------------------------------------------------------------|\n| `count` | Number, optional | The number of IDs to generate, one by default. |\n| `callback` | Function, optional | An optional callback. If not supplied, the call is made synchronously. |"]]