notify clients when a contract is added or removed

Bug #1170523 reported by Victor Martinez
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Contractor
Fix Released
Wishlist
Victor Martinez

Bug Description

Whenever a contract is added or removed, contractor should notify its clients about it so that those changes are reflected on whatever widget the client is using to make them available.

Having the contract_added() and contract_removed() signals as part of the DBus API would be great, though if you're feeling lazy, a single contracts_changed() signal could be enough.

Related branches

Changed in contractor:
status: New → Triaged
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

I'd go for the simple way with having just one signal. The primary reason is that it's very future-proof and easier to implement in clients.

Individual signals for various changes sound like they would work faster, but deltas might get more costly than a full reload if we change the state of a lot of contracts at once. For example, I pull the network plug and 2/3 of contracts go off, that'd be a lot of d-bus signalling back and forth and individual updates too, all competing for CPU time. Simply reloading the list with one signal would be much better performance-wise in this case. Even now Contractor itself waits for a little while before reloading contracts - 100ms (AFAIR) after the last change to its files and *then* reloads them just once.

And it's not like we have to care about performance of passing a bunch of strings around in the first place. If it turns out to be slow, we can always add more fine-grained callbacks.

summary: - notify when a contract is added or removed
+ notify clients when a contract is added or removed
Changed in contractor:
importance: Undecided → Wishlist
Changed in contractor:
status: Triaged → In Progress
assignee: nobody → Victor (victored)
RabbitBot (rabbitbot-a)
Changed in contractor:
status: In Progress → Fix Committed
Cody Garver (codygarver)
Changed in contractor:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.