Webador / SlmQueue

Laminas / Mezzio module that integrates with various queue management systems.
Other
137 stars 56 forks source link

Correct max runs #131

Closed bakura10 closed 8 years ago

bakura10 commented 10 years ago

ping @juriansluiman @basz

I don't know why but SlmQueueSqs always reported one more job that how much was really executed. If set at the end, it works correctly.

Can you please try in your app with Doctirne if you have the same issue?

bakura10 commented 10 years ago

Mmhh this is strange, tests time out (the same happens locally). If i revert the thing at the top of the method, tests work again...

basz commented 10 years ago

Don't know what's going on here, but $this->runCount++; should be the first thing run after a job is processed. More likely the >= comparison and/or state setting is incorrect (not verified)

basz commented 10 years ago

when i var_dump some stuff within the strategy things seems to operating correctly. Are you sure you don't have an issue in a custom ProcessQueueStrategy?

bakura10 commented 10 years ago

In SlmQueueDoctrine the count is reported correctly?

basz commented 10 years ago

yes

bakura10 commented 10 years ago

I've not been able to experience that every time. Actuallly, it seems there are some problems when the job triggers an exception, it's actually not executed but the counter increments. Anyway, it's not a big issue (only cosmetic) so we can fix that later.

basz commented 10 years ago

Yes, seems you are correct, event flow is incomplete when Exceptions occure. I think a solution would be to add an event to be broadcasted when exceptions occur.