| 1 |
#!/usr/bin/env python |
| 2 |
|
| 3 |
import globus_sdk |
| 4 |
from globus_sdk.experimental.globus_app import UserApp |
| 5 |
|
| 6 |
# Tutorial Client ID - <replace this with your own client> |
| 7 |
NATIVE_CLIENT_ID = "61338d24-54d5-408f-a10d-66c06b59f6d2" |
| 8 |
USER_APP = UserApp("manage-timers-example", client_id=NATIVE_CLIENT_ID) |
| 9 |
|
| 10 |
|
| 11 |
def main(): |
| 12 |
client = globus_sdk.TimersClient(app=USER_APP) |
| 13 |
|
| 14 |
first = True |
| 15 |
for record in client.list_jobs(query_params={"filter_active": True})["jobs"]: |
| 16 |
if not first: |
| 17 |
print("---") |
| 18 |
first = False |
| 19 |
print("name:", record["name"]) |
| 20 |
print("id:", record["job_id"]) |
| 21 |
|
| 22 |
|
| 23 |
if __name__ == "__main__": |
| 24 |
main() |