Content
Wrong user of JobStatus
Added by Alexander Aleschenko 5 days ago
Hello,
i'm having interesting problem, it's hard to reproduce and don't know how to dig it. On one instance with exporting table grouped by version it shoots almost every time, but limited debug possibilities there. Exporting some other query works well. On dev envs it shoots somewhere 1 on 15-20 exports. Looks like race conditions or smth.
Steps to reproduce:
-
Login with any user(non anonymous)
-
Open WP table
-
Click menu → export
-
Switch to XLS tab, click export.
Export task is enqueued, export notification popup shows up but then immediately "This job could not be found." (I18n job_status_dialog.generic_messages.not_found) appears.
Looking into jobs via GoodJob dashboard and into database shows safe and sound job with successful status. Then if I go to JobStatus::Status and find needed job, I see everything OK(status, message with generated file path) BUT user_id is not mine, it's from Anonymous user.
Digging logs while clicking Export button shows correct ID of logged in user(web, controller side), but then somehow I see inserting job status with anonymous user AND it was inserted by Worker instance, not Web. So this leads to notfound error when querying status.
Anyone encountered such problem?