Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use loadEvents with startTime and endTime #2147

Open
pavsenin opened this issue Nov 23, 2021 · 1 comment · Fixed by #2142
Open

Cannot use loadEvents with startTime and endTime #2147

pavsenin opened this issue Nov 23, 2021 · 1 comment · Fixed by #2142
Assignees
Labels
bug Issues related to defects and incorrect/unexpected feature behavior severity: major Issues with high impact on the product, e.g., new packages, installation issues, etc.

Comments

@pavsenin
Copy link

To Reproduce
Steps to reproduce the behavior:

Execute the following code in api-handler:

const eventFilter = {
startTime: new Date('2021-09-16T09:00:00').getTime() / 1000,
endTime: new Date('2021-11-20T09:30:00').getTime() / 1000,
limit: 2000,
eventsSizeLimit: Number.MAX_SAFE_INTEGER,
eventTypes: [
UPLOAD_CREATED
]
};
const result = await req.resolve.eventstoreAdapter.loadEvents(eventFilter);
await res.json(result);

Expected behavior
The list of events is returned.

@MrCheater MrCheater added bug Issues related to defects and incorrect/unexpected feature behavior severity: major Issues with high impact on the product, e.g., new packages, installation issues, etc. labels Nov 24, 2021
@FreeSlave
Copy link
Contributor

FreeSlave commented Nov 29, 2021

This was fixed in #2142 and available since 0.33.4
However the current documentation is wrong at some places and lacks details. For example the right key is finishTime, not endTime. Also startTime and finishTime are in milliseconds, so no need to use division.
Please note also that the cursor returned from loadEvents with timestamp filter is currently invalid and can't be used in consequent calls to loadEvents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to defects and incorrect/unexpected feature behavior severity: major Issues with high impact on the product, e.g., new packages, installation issues, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants