diff options
author | Thomas White <taw@physics.org> | 2023-06-03 17:58:41 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-06-03 17:58:41 +0200 |
commit | ca77de46b42713993b1cfb18e9a30de522d8a69e (patch) | |
tree | 0f33d819e36ea88a6cde110e924ff8975965bb4c /src | |
parent | 357b023f8045ad39afb4d1b4c7ca08126b1248fb (diff) |
ASAP::O: Use unique filename for hits
Diffstat (limited to 'src')
-rw-r--r-- | src/im-asapo.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/im-asapo.c b/src/im-asapo.c index 16bd328f..4d483669 100644 --- a/src/im-asapo.c +++ b/src/im-asapo.c @@ -283,17 +283,20 @@ static void send_real(struct im_asapo *a, struct image *image) { AsapoMessageHeaderHandle header; AsapoErrorHandle err; + char filename[1024]; - err = asapo_new_handle(); + snprintf(filename, 1024, "processed/%s_hits/%s-%i.data", + a->stream, a->stream, image->serial); header = asapo_create_message_header(image->serial, image->data_block_size, - image->filename, + filename, image->meta_data, 0, /* Dataset substream */ 0, 0); /* Auto ID */ + err = asapo_new_handle(); asapo_producer_send(a->producer, header, image->data_block, kDefaultIngestMode, a->stream, send_callback, &err); @@ -313,17 +316,20 @@ static void send_placeholder(struct im_asapo *a, struct image *image) { AsapoMessageHeaderHandle header; AsapoErrorHandle err; + char filename[1024]; - err = asapo_new_handle(); + snprintf(filename, 1024, "processed/%s_hits/%s-%i.placeholder", + a->stream, a->stream, image->serial); header = asapo_create_message_header(image->serial, 8, /* strlen("SKIPPED"+\0) */ - image->filename, + filename, image->meta_data, 0, /* Dataset substream */ 0, 0); /* Auto ID */ + err = asapo_new_handle(); asapo_producer_send(a->producer, header, "SKIPPED", kDefaultIngestMode, a->stream, send_callback, &err); |