Nothing added to exported file on queue-run

Created on 7 July 2023, over 1 year ago

Problem/Motivation

Export is empty when processing the queue vde_drush_queue by drush (or cron).
You may need to run this queue manually if previous export finished with out-of-memory error.

Steps to reproduce

1) Create View with "Access: Role Administrator"
2) run drush command
drush vde_drush:views-data-export view_id display_id /filepath/export.csv --yes
3) after command will fail with "Fatal error: Allowed memory size" run
drush queue-run vde_drush_queue

AR: exported file will not be updated.
ER: new lines should be added to previously created export file.

Proposed resolution

The issue is with permissions. When we run drush command we switch user account to uid 1.
But on queue processing user is anonymous and that's why view returns no results.

Remaining tasks

To be honest, I dont like the situation when drush command fails with out of memory error.
As a solution we should not process queue items in vde_drush:views-data-export if export has more than X results. maybe > 10000.
New command could be created to create queue items only and then developer need to run script like this
for i in {1..100}; do drush queue-run vde_drush_queue --items-limit=10 ;done
to have all items in export.

πŸ› Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine andriic

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024