User:JGiannelos (WMF)/Notes/JobQueue-dev-env

  • Running background tasks on mediawiki is handled via JobQueue
  • JobQueue has various implementations
    • Simple JobQueue
      • DB based
      • Doesn't implement delayed events
      • Default in most MW development environments
    • Redis JobQueue
      • Redis based
      • Allows delayed events
      • Needs redis based jobrunner to work (mediawiki/services/jobrunner)
    • EventBus JobQueue
  • Working with jobs (php)
  • For delayed jobs
    • When building the job pass the `jobReleaseTimestamp` parameter in the constructor's params
    • This is a unix timestamp of when (roughly) the job is going to be executed
    • Important -> your dev env setup should us a JobQueue implementation that supports delayed jobs