elastic / connectors-ruby

Official Connector Clients for Elastic Elasticsearch, Enterprise Search, App Search and Workplace Search
https://www.elastic.co/guide/en/enterprise-search/master/index.html
Other
9 stars 17 forks source link

Add custom scheduling trigger #513

Closed navarone-feekery closed 1 year ago

navarone-feekery commented 1 year ago

https://github.com/elastic/enterprise-search-team/issues/3594

These changes allow ent-search to pick up sync jobs that are triggered by custom schedules.

Even if all schedules are ready to sync, only a single :sync will yield. The "main" schedule is always prioritised first. Custom schedules are then iterated over and the first found is yielded. There is currently no ordering or prioritisation rankings within custom scheduling.

Ent-search changes are in progress as I'm seeking feedback on this before changing ent-search too much. Essentially if the scheduling_key from the :sync yield is not nil then it will use that key's custom scheduling value to create a sync job.

Checklists

Pre-Review Checklist

Related Pull Requests

navarone-feekery commented 1 year ago

@vidok is there anything else in this PR that you think could be changed?

vidok commented 1 year ago

@vidok is there anything else in this PR that you think could be changed?

I left one comment but no changes are required from my side 🚀