Skip to content

Conversation

battermann
Copy link
Contributor

@battermann battermann commented Sep 30, 2025

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Sep 30, 2025
@battermann battermann force-pushed the WPB-20728-background-job-for-user-group-to-channel-association branch from ff76698 to 7d72068 Compare October 2, 2025 14:59
@battermann battermann changed the base branch from develop to gdifolco/WPB-19713_user-groups-channels-list October 2, 2025 15:01
@blackheaven blackheaven force-pushed the gdifolco/WPB-19713_user-groups-channels-list branch from c71074e to b4af1e1 Compare October 2, 2025 15:52
@blackheaven blackheaven force-pushed the WPB-20728-background-job-for-user-group-to-channel-association branch from 7d72068 to a09bc11 Compare October 2, 2025 16:21
# Maximum number of in-flight jobs per process
concurrency: 8
# Per-attempt timeout in seconds
jobTimeout: 60
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this something we want to define per job type? deleting users takes less time than scanning a huge table for inconsistencies.

i have little context, though. maybe i'm thinking ahead to far.

-- You should have received a copy of the GNU Affero General Public License along
-- with this program. If not, see <https://www.gnu.org/licenses/>.

module Wire.API.BackgroundJobs where
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know we're using wire-api for way more than our types containing rest api artefacts, but is this pushing it too far? this module is not used in any service other than background worker, and i think it shouldn't be. move to background-worker subsystem?

import Wire.BackgroundJobsRunner.Interpreter (interpretBackgroundJobsRunner)
import Wire.BackgroundWorker.Env (AppT)

dispatchJob :: Job -> AppT IO (Either Text ())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe something with more structure than Text for the errors?

@blackheaven
Copy link
Contributor

blackheaven commented Oct 3, 2025

@battermann I have pushed the new jobs from the interpreter, I have fixed the job processing, and injected the options on the Haskell side.

Tests and k8s are left to be done.

Not touched: Matthias review and sync-user-group-and-channel.

@battermann battermann force-pushed the WPB-20728-background-job-for-user-group-to-channel-association branch from 58ad87b to e967a41 Compare October 6, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants