Code

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#16547 closed New feature (wontfix)

Add support for signal priority.

Reported by: EvilX Owned by: nobody
Component: Core (Other) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Sometimes is very important to call one signal earlier of all other or call signals in queue.

Currently, when you connect signals, them executed in order of connect; but its non trivial to guaratee order of connect method execution.

Proposed solution is to add order argument to connect signal, so when you need, you can supply correct ordering, but all other code still compatible.

Attached patch provide this feature.

Attachments (1)

signal.patch (2.8 KB) - added by EvilX 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by EvilX

comment:1 Changed 3 years ago by mk

  • Component changed from Uncategorized to Core (Other)
  • Needs documentation set
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 3 years ago by jacob

  • Resolution set to wontfix
  • Status changed from new to closed

Django's signal framework is deliberately minimalistic. It's a pattern that doesn't really match the rest of Django, and we try to minimize its use. As such, I don't believe we should be adding features -- even good ones like this. If people need a robust signal-handling system, they should look elsewhere.

Thanks!

comment:3 Changed 2 years ago by anonymous

Hi jacob,
I think the signal framework is a really powerful tool for building reusable applications, and when you're sticking together multiple reusable applications one of the common issues could be the order of signal execution.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.