marionnewlevant / craft-snitch

Craft plugin. Report when two people might be editing the same entry, category, or global
MIT License
35 stars 16 forks source link

Immediate check, then use interval #16

Open kringkaste opened 4 years ago

kringkaste commented 4 years ago

Hi! Thanks for this really nice plugin!

We use your plugin in an installation, with 20 editors working in the Craft CMS at the same time. Therefore we have set the interval to 10 seconds to keep the load on the server low.

I have seen that the plugin checks for collisions when the first interval is over. It would be a real improvement if the first check would be done directly and then the interval would be used for all following checks.

This could prevent the effect that an editor already starts to edit an entry and then the warning is shown up. In this way, the editor would immediately see that another editor already has the entry open.

Would this be possible?

kringkaste commented 4 years ago

Hello, just wanted to know if I could get a quick respond here? That would be great! Thanks!

marionnewlevant commented 4 years ago

I'm looking at the code now - I think it is supposed to work the way you want: look for conflicts immediately, and then start polling. There is a delay when a new modal appears, because snitch finds these modals by polling.

adrienne commented 3 years ago

@marionnewlevant - it definitely does not seem to be checking until after the first polling interval, just fyi.