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

Service Now Event Collector - Improved the fetch events efficiency #38182

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ShacharKidor
Copy link
Contributor

Contributing to Cortex XSOAR Content

Make sure to register your contribution by filling the contribution registration form

The Pull Request will be reviewed only after the contribution registration form is filled.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

fixes: link to the issue

Description

In this bug XSUP-45347 the customer couldn't fetch audit logs since their audit logs table is loaded.
To fix that we added a use of the sysparm_no_count parameter in the fetch query.
According to this API reference -
https://www.servicenow.com/docs/bundle/vancouver-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html
The sysparm_no_count parameter:

Flag that indicates whether to execute a select count(*) query on the table to return the number of rows in the associated table.
Valid values:
true: Do not execute a select count(*).
false: Execute a select count(*).
Data type: Boolean
Default: false

Setting it to True improved the efficiency of the search event function.

Another reference:
https://www.servicenow.com/community/developer-forum/rest-api-the-dreaded-quot-maximum-execution-time-exceeded-quot/m-p/1706846

Must have

  • Tests
  • Documentation

Copy link

github-actions bot commented Jan 15, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
Packs/ServiceNow/Integrations/ServiceNowEventCollector
   ServiceNowEventCollector.py106793%41–42, 44, 50–51, 58–59
TOTAL106793% 

Tests Skipped Failures Errors Time
37 0 💤 0 ❌ 0 🔥 2.250s ⏱️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant