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

Add runAs to import job Queue Task #24805

Merged
merged 1 commit into from
Oct 26, 2022
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Oct 24, 2022

Overview

Builds on #24761 to ensure runAs is saved in the import queue job.

Before

The user to run the import as is not stored

After

As shown in the test & this IDE screenshot - the runAs is stored per #24761

In stepping through this test I was able to verify it is honoured - although I have not yet gotten the queue to process in the background via coworker

image

Technical Details

Comments

@civibot civibot bot added the master label Oct 24, 2022
@civibot
Copy link

civibot bot commented Oct 24, 2022

(Standard links)

@eileenmcnaughton
Copy link
Contributor Author

@totten this works on the storage side - per my comments on https://lab.civicrm.org/dev/coworker/-/commit/d92fe0892b2602a99df78ed7f74b381925d481eb I do think a user with permission to run the Queue.runItems api should have the items run in the intended user context & hence the handling for runAs should be there

@totten
Copy link
Member

totten commented Oct 26, 2022

I did some r-run for contact-more-than-100-rows.csv, looking from a few angles:

  • Inspect the content of civicrm_queue -- and it does show the records with the runAs filled in.
  • Run the import in the foreground (normal/default)
  • Run the import in the background (cv vset enableBackgroundQueue=1) with either:

@totten totten merged commit d0c3a39 into civicrm:master Oct 26, 2022
@eileenmcnaughton eileenmcnaughton deleted the runas branch October 26, 2022 19:35
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