aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-09-09 16:25:57 +0200
committerThomas White <taw@physics.org>2022-06-02 12:15:38 +0200
commit0c566e3bcc918f8f047fd3b2aad866f0e81e582f (patch)
tree1cc6f3ee2c91eda966f856f62ff7fba98727c9af /src
parent71e9837def30091db678cd3e93780b90924e2582 (diff)
ASAP::O: Simplify im_asapo_make_unique_group_id
Diffstat (limited to 'src')
-rw-r--r--src/im-asapo.c10
-rw-r--r--src/im-asapo.h8
-rw-r--r--src/im-sandbox.c4
3 files changed, 6 insertions, 16 deletions
diff --git a/src/im-asapo.c b/src/im-asapo.c
index 3920eadd..876de222 100644
--- a/src/im-asapo.c
+++ b/src/im-asapo.c
@@ -61,17 +61,15 @@ static void show_asapo_error(const char *msg, const AsapoErrorHandle err)
char *im_asapo_make_unique_group_id(const char *endpoint,
- const char *token,
- const char *beamtime,
- const char *path)
+ const char *token)
{
AsapoConsumerHandle consumer;
AsapoSourceCredentialsHandle cred;
AsapoStringHandle group_id;
AsapoErrorHandle err = asapo_new_handle();
- cred = asapo_create_source_credentials(kProcessed, beamtime, "", "", token);
- consumer = asapo_create_consumer(endpoint, path, 1, cred, &err);
+ cred = asapo_create_source_credentials(kProcessed, "", "", "", token);
+ consumer = asapo_create_consumer(endpoint, "", 0, cred, &err);
asapo_free_handle(&cred);
if ( asapo_is_error(err) ) {
show_asapo_error("Cannot create temporary ASAP::O consumer", err);
@@ -79,8 +77,6 @@ char *im_asapo_make_unique_group_id(const char *endpoint,
return NULL;
}
- asapo_consumer_set_timeout(consumer, 1000);
-
group_id = asapo_consumer_generate_new_group_id(consumer, &err);
asapo_free_handle(&consumer);
if ( asapo_is_error(err) ) {
diff --git a/src/im-asapo.h b/src/im-asapo.h
index b0c413f5..4f5c13f7 100644
--- a/src/im-asapo.h
+++ b/src/im-asapo.h
@@ -47,9 +47,7 @@ extern void im_asapo_shutdown(struct im_asapo *a);
extern void *im_asapo_fetch(struct im_asapo *a, size_t *pdata_size);
extern char *im_asapo_make_unique_group_id(const char *endpoint,
- const char *token,
- const char *beamtime,
- const char *path);
+ const char *token);
#else /* defined(HAVE_ASAPO) */
@@ -73,9 +71,7 @@ static UNUSED void *im_asapo_fetch(struct im_asapo *a, size_t *psize)
}
static char *im_asapo_make_unique_group_id(const char *endpoint,
- const char *token,
- const char *beamtime,
- const char *path)
+ const char *token)
{
return NULL;
}
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index 512a12df..fed3873e 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -1160,9 +1160,7 @@ int create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
sb->asapo_group_id = strdup(asapo_group_id);
} else {
sb->asapo_group_id = im_asapo_make_unique_group_id(asapo_endpoint,
- asapo_token,
- asapo_beamtime,
- asapo_path);
+ asapo_token);
}
if ( sb->asapo_group_id == NULL ) {
ERROR("Failed to create ASAP::O group ID.\n");