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

ClaimItems API - Optionally return the "run as" (contact ID/domain ID) #24761

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

totten
Copy link
Member

@totten totten commented Oct 17, 2022

Overview

The ClaimItems API provides a facade for remote workers calling CRM_Queue_Queue_*::claimItems(). Some items have "run as" flags (eg CRM_Queue_Task::$runAs). This patch makes it easier to read "runAs".

Before

Not specifically returned.

After

Available as an optional value "select" field.

Comments

This makes it easier/cheaper for coworker to run tasks from various users/domains. It complements this draft update: https://lab.civicrm.org/dev/coworker/-/commit/d92fe0892b2602a99df78ed7f74b381925d481eb

This currently only returns the "run as" for CRM_Queue_Task. Using identities with other types of queue-items is currently hypothetical. Dealing with that hypothetical is a longer write-up/topic, but IMHO this is reasonably aligned with how that edge-case should get resolved.

@civibot
Copy link

civibot bot commented Oct 17, 2022

(Standard links)

@civibot civibot bot added the master label Oct 17, 2022
@eileenmcnaughton
Copy link
Contributor

I stepped through this & was able to add to the import job - #24805 and via stepping through the code verify it is checked. I have not succeeded in getting coworker to work yet so was unable to verify that but this seems like one of the pieces

@eileenmcnaughton eileenmcnaughton merged commit e10bc29 into civicrm:master Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants