ee.data.newTaskId
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Generuje identyfikator „nieprzesłany” dla długo trwającego zadania.
Zanim zadania zostaną przesłane, mogą im zostać przypisane identyfikatory, aby można było je śledzić. Serwer dba o to, aby tego samego identyfikatora nie można było użyć ponownie. Identyfikatory te mają format UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Zadania uruchomione na serwerze mają identyfikator bez łączników. Jest on zwracany przez funkcję ee.data.startProcessing i inne metody wsadowe.
Zwraca tablicę zawierającą wygenerowane ciągi identyfikatorów lub wartość null, jeśli określono wywołanie zwrotne.
Wykorzystanie | Zwroty |
---|
ee.data.newTaskId(count, callback) | List<String> |
Argument | Typ | Szczegóły |
---|
count | Numer, opcjonalny | Liczba identyfikatorów do wygenerowania (domyślnie 1). |
callback | Funkcja (opcjonalnie) | opcjonalne wywołanie zwrotne. Jeśli nie zostanie podany, wywołanie zostanie wykonane synchronicznie. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\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. |"]]