Skip to content

Commit

Permalink
[api/worker] Bump the Python library
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Hassine committed Apr 7, 2021
1 parent 29e0e5a commit a79a3ba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions opencti-platform/opencti-graphql/src/database/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,17 @@ export const getStreamRange = async (from, limit, callback) => {
const client = await createRedisClient();
const size = limit > MAX_RANGE_MESSAGES ? MAX_RANGE_MESSAGES : limit;
return client.call('XRANGE', OPENCTI_STREAM, from, '+', 'COUNT', size).then(async (results) => {
let lastEventId;
if (results && results.length > 0) {
await processStreamResult(results, callback);
const lastResult = R.last(results);
lastEventId = R.head(lastResult);
} else {
const streamInfo = await fetchStreamInfo();
lastEventId = streamInfo.lastEventId;
}
await client.disconnect();
const lastResult = R.last(results);
return { lastEventId: R.head(lastResult) };
return { lastEventId };
});
};
// endregion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pycti==4.3.4
pycti==4.3.5
stix2-patterns==1.3.2
elasticsearch==7.12.0
plyara==2.1.1
Expand Down
2 changes: 1 addition & 1 deletion opencti-worker/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pycti==4.3.4
pycti==4.3.5
black==20.8b1

0 comments on commit a79a3ba

Please sign in to comment.